By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,696 Members | 1,512 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,696 IT Pros & Developers. It's quick & easy.

enable visual styles and toolbars

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <br******@adelphia.net> wrote in message
news:O%***************@tk2msftngp13.phx.gbl...
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

Nov 20 '05 #2

P: n/a
didn't help doing a doevents call.. everything is still blank images
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:Oy*************@tk2msftngp13.phx.gbl...
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" <br******@adelphia.net> wrote in message
news:O%***************@tk2msftngp13.phx.gbl...
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


Nov 20 '05 #3

P: n/a
* "Brian Henry" <brianiup[nospam]@adelphia.net> scripsit:
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'?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.