Toolbar images disappear

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

I've got a toolbar reading images from an image list. Inside of visual
studio the images show up fine, but once I compile and run the program the
images don't show up in the toolbar. Does anyone know why this is
happening?
 
Marco said:
I've got a toolbar reading images from an image list. Inside of visual
studio the images show up fine, but once I compile and run the program the
images don't show up in the toolbar. Does anyone know why this is
happening?

If you are using Windows XP Visual Styles, make sure you call
'Application.DoEvents' directly after calling
'Application.EnableVisualStyles'.
 
I tried adding that in and it made no difference, disabling visual styles
also made no difference.
 
Turns out that you were right. I was calling EnableVisualStyles after
InitializeComponent which is what screwed everything up. Once I put it
before InitializeComponent everything worked. Thanks for the help.


Marco said:
I tried adding that in and it made no difference, disabling visual styles
also made no difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top