Toolbar icons

  • Thread starter John J. Hughes II
  • Start date
J

John J. Hughes II

I have a toolbar on a windows tab control tab page which is on a form. I
have added three buttons with icons via an image list. The icons display
correctly in the VS and the first time I compile from the runtime. But when
I compile again they vanish from the runtime but still appear correctly in
the VS. I have another form where they display correctly but the toolbar is
on the form itself, not sure if this is the problem.

Any suggestion on how to get the toolbar icons to display correctly?

Regards,
John
 
J

John J. Hughes II

Yes I'm running on WinXP pro SP2 with all patches up to date and VS 2003.

"Mick Doherty"
 
M

Mick Doherty

This generally happens with a call to Application.EnableVisualStyles.
Follow the call with a call to Application.DoEvents and make sure that these
calls are made in Sub Main().

An alternative solution is to add a Manifest resource to the App instead of
calling EnableVisualStyles.

If your Icons have an Alpha Channel then you may find that they display
incorrectly. In this case load the imagelist at runtime.
 
J

John J. Hughes II

Thanks for the response, I don't enable visual styles anywhere in my code
and since the icon is converted to a bitmap when placed in a image list so I
don't understand how the alpha channel applies. I have noted that if I
place the tool bar on the tab instead of the tab page it seem to work
correctly.

Regards,
John.
 

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

Top