App.EnableVisualStyles kills my Toolbar icons

  • Thread starter Thread starter Mark D. Richter
  • Start date Start date
M

Mark D. Richter

I am calling Application.EnableVisualStyles() before
calling Application.Run() as prescribed.

I have a Toolbar control docked at the top of the main
program's window. This control is attached to an
ImageList control set for 16x16 bit icons.

When the main window displays there are no icons
displayed on the toolbar buttons.

If I run the app without calling EnableVisualStyles the
toolbar button icons display properly.

Any ideas?

Thanks.
 
Mark,
There is a buglet in the Application.EnableVisualStyles, you need to follow
it by Application.DoEvents for it to fully work.

Application.EnableVisualStyles()
Application.DoEvents()
Application.Run()

Some people have better mileage with the manifest method (ala 1.0).

Hope this helps
Jay
 
Back
Top