Failed to load

The place for programming-related topics.
Post Reply
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Failed to load

Post by Mex »

Hi Timo!

You have "deeper" experiences with VB6 and controls :)

I have a MDI application. When user (i dont know why) opens 20 or more child forms, following error happens
'Failed to load control 'ImageList' from mscomctl.OCX. Your version of mscomctl.OCX may be outdated. Make sure you are using the version of the control that was provided with your application.' (372).
I't seems this error happens only with XP. Tested with Win7, app. gets very slow of course, but no error.

Do you know why this happens and how to avoid this?


Best regards;
Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Failed to load

Post by TiKu »

Hi,

as you mentioned that the system becomes slow, I could imagine that it runs out of resources. You should open task manager and watch the number of USER objects and GDI objects for your program's process. Especially the number of GDI objects is probably very high (several thousand). As far as I know Windows Vista and newer can handle more GDI objects.

As a workaround you could try using API-based image lists instead. Of course this will require lots of work.

/Edit: You should also check for memory leaks. At work we've also a VB6 MDI application with tons of children. For a while we had problems with non-obvious circle references between UserControls and Forms which have been caused by the UserControls and some helper classes. The result was that most MDI childs got unloaded only partly, i.e. you did not see them anymore and as far as I remember they no longer appeared in the Forms collection, but they were still in memory (you could see it in task manager).

Regards
Timo
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply