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

VB 2005 Visual Styles problem

P: n/a
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.Applicatio nServices.Authent
icationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.S hutdow
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

Aug 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In your test application what are the controls you tried ? In particular
make sure you don't confuse menubar,toolbar with menustrip/toolstrip...

--
Patrice

<nk******@googlemail.coma écrit dans le message de news:
11**********************@h48g2000cwc.googlegroups. com...
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.Applicatio nServices.Authent
icationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.S hutdow
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

Aug 18 '06 #2

P: n/a
If you change the Start up form, does the error go away?

Tommaso

nk******@googlemail.com 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.Applicatio nServices.Authent
icationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle =
Global.Microsoft.VisualBasic.ApplicationServices.S hutdow
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
Aug 18 '06 #3

P: n/a
On 18 Aug 2006 06:01:51 -0700, nk******@googlemail.com wrote:
>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.Applicati onServices.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
Aug 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.