VB 2005 Visual Styles problem

  • Thread starter Thread starter nkarnold
  • Start date Start date
N

nkarnold

My application seems to be ignoring Enable XP visual styles, which is
ticked on in the application properties.

the Toolbar and Menubar, which appear the nice looking shaded blue
appear like that whilst in the IDE, but when I run the app, they both
go to boring grey.

In the application.designer.vb self generated file, it does have
PublicSubNew()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.Authent
icationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.Shutdow
nMode.AfterMainFormCloses
EndSub

If i create a brand new application, just as a test and drop the two
controls into that, they appear with visual styles.

So it looks like its something to do with my project, but i can't find
out where or why.

any help appreciated.

Cheers

Nig
 
In your test application what are the controls you tried ? In particular
make sure you don't confuse menubar,toolbar with menustrip/toolstrip...
 
If you change the Start up form, does the error go away?

Tommaso

(e-mail address removed) ha scritto:
 
My application seems to be ignoring Enable XP visual styles, which is
ticked on in the application properties.

the Toolbar and Menubar, which appear the nice looking shaded blue
appear like that whilst in the IDE, but when I run the app, they both
go to boring grey.

In the application.designer.vb self generated file, it does have
PublicSubNew()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.Authent
icationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.Shutdow
nMode.AfterMainFormCloses
EndSub

If i create a brand new application, just as a test and drop the two
controls into that, they appear with visual styles.

So it looks like its something to do with my project, but i can't find
out where or why.

any help appreciated.

Cheers

Nig

"Shaded Blue" implies to me, a blue gradient. If that's the case, I'm curious as to what default
condition produces a blue gradient in design.

The most common way to reproduce what you desescribe if there is a default gradient on a toolstrip
in design is a line of code at runtime that references the ToolStrip's BackColor property. With
VisualStyles, for the default gradient to display, the BackColor is Nothing, not
SystemColors.Control which is usually grey in most cases.

Gene
 
Back
Top