enable visual styles and toolbars

  • Thread starter Thread starter Brian Henry
  • Start date Start date
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
 
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
 
* "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'?
 
Back
Top