Small Problem In Windows Forms visual styles

OmarOthman

New member
Joined
Nov 1, 2006
Messages
4
Programming Experience
3-5
When I make a new ToolStrip, and begin inserting ToolStripMenuItems in it, everything is OK in the designer, but at runtime the color of the ToolStrip changes to the VS.NET 2005's light brown. I want Office 2003's blue, as in the designer. I tried Application.EnableVisualStyles(), and it corrected the ToolStripMenuItems but not the ToolStrip itself. Also, you know that when you make a ToolStripMenuItem's Text property, for example; &VB, it'll be shown in the ToolStripMenuItem as VB, with the V underlined. Again this is evident in the designer, but not at runtime. Of course the problem is not to change a color or underline a letter, I really want to know what happens exactly and understand it. Is this a bug?!
Thanks in advance.
 
What theme are you using in XP? What is the RenderMode property of the menu strip set to? Go to the Application tab of the project properties. Are the "Enable application framework" and "Enable XP visual styles" options checked?

As for the underlined access keys, that's a Windows XP feature. The default behaviour in Windows XP is to hide access keys until you hit the Alt key. If you want to change that behaviour then you need to do it in XP. It's under Display Properties -> Appearance -> Effects. Change it for your own system if you want but do NOT try to change it on your user's system. It's a system setting and it should be up to the user of the system to set it.
 
Theme: Windows XP (Modified). RenderMode = ManagerRenderMode.

I'm really very thankful to your fast and detailed reply. But please there's a small comment: I didn't find the check boxes you mentioned! I'm sure I looked in the correct place. Are they found in every application?

Thanks very much again for your care :).
 
I didn't find the check boxes you mentioned! I'm sure I looked in the correct place.
Windows Start Menu > Control Panel > Display > Appearance > Effects > checkbox "Hide underlined..."

Did you also check Application Properties > Application tab > checkbox "Enable XP visual styles" ?
 
Sorry it seems I wasn't detailed enough. I was talking about the two check boxes of the application tab in the project properties. In VS.NET 2005: Project -> Properties -> Application Tab. There I didn't find any check boxes...
 
I'm sorry :eek: I knew the reason... actually I'm a C# developer, and I've got accross this forum and decided to post here when I saw its reputation. I thought there'll be no much difference.
Anyway thanks very much for your continuous support. I now know that the RenderMode property is the one I must learn, and the underlined letters (the access keys) issue is resolved. If you know a C# Windows Forms forum as large and dedicated as this one, please tell me.
 
Back
Top