enable visual styles and toolbars

B

Brian Henry

here's something odd, maybe someone can explain it, when i turn on
application.enablevisualstyles at application start before i do my
application.run(context) command in the sub main, when the app context runs
and I get my main form, the toolbar is now missing all its icons (24x24) the
buttons are there just the icons are gone, also pretty much all image list
icons are not displaying. as soon as i turn the enable visual styles off,
they show up again, whats goning on with this? I don't really need visual
styles on, but I just thought that was a wierd behaviour
 
J

Jay B. Harlow [MVP - Outlook]

Brian,
Its a known bug, the workaround is to call DoEvents between Enable Visual
Styles & Run.

Something like

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

Alternatively you can use a manifest file as in VB.NET 2002, however I do
not have a link for that handy.

Hope this helps
Jay
 
H

Herfried K. Wagner [MVP]

* "Brian Henry said:
didn't help doing a doevents call.. everything is still blank images

Mhm... That should work. Did you try adding a manifest and remove the
call to 'EnableVisualStyles'?
 

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