|
-
Apr 14th, 2006, 09:10 PM
#1
Thread Starter
No place like 127.0.0.1
[RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
Is there anyway to get a silver menu like the one Visual Studio uses? I'd perfer not to draw my own. Are there any third party classes out there that extend the default menu and let you do that?
Last edited by eyeRmonkey; Apr 22nd, 2006 at 03:02 PM.
-
Apr 14th, 2006, 09:13 PM
#2
Re: [2005] Silver Menu Link the Visual Studio 2005 Menu
What do you mean by silver menu? I have no silver menu (It may be because of your Window's theme). A MenuStrip should mimic VisualStudio's Menu
-
Apr 14th, 2006, 09:21 PM
#3
Re: [2005] Silver Menu Link the Visual Studio 2005 Menu
The MenuStrip does indeed follow the theme of your OS, so it will be blue if you are using the default theme. The VS 2005 menu uses the system colour Control as the basis for the colour of its menus. The whole ToolStrip, MenuStrip, StatusStrip family are set up so you can provide your own custom renderer to make them look how you want, rather than actually drawing them yourself. You should read up on the RenderMode property of the ToolStrip class (MenuStrip inherits ToolStrip). The help topic has some links in the Other Resources section at the bottom that explain how to create your own renderer.
-
Apr 14th, 2006, 09:42 PM
#4
Thread Starter
No place like 127.0.0.1
Re: [2005] Silver Menu Link the Visual Studio 2005 Menu
My XP Theme is blue and my menu renders blue, but in Visual Studio the menu is silver. I was wondering how I could get my menu to be silver like that? When I change the background color, it becomes a solid background (instead of a fade like it is by default).
I looked into the RenderMode property and how to create my own before I posted. It doesn't look horribly complicated, but I was wondering if there was simplier way to just get the same color that Visual Studio has. If it's not simple I will skip it for now, and maybe come back to making my own renderer when the main parts of the applicaiton are done.
-
Apr 14th, 2006, 09:55 PM
#5
Re: [2005] Silver Menu Link the Visual Studio 2005 Menu
The implication was that the designers of Visual Studio have created a custom renderer. There's a lot in VS that isn't standard .NET controls. Of course a company as big as Microsoft are going to make their applications distinctive.
-
Apr 14th, 2006, 10:24 PM
#6
Thread Starter
No place like 127.0.0.1
Re: [2005] Silver Menu Link the Visual Studio 2005 Menu
Okay, that is kind of what I was thinking. Like I said, once I finish the basics of the app I will go back and look into Renderers.
Thanks.
-
Apr 22nd, 2006, 07:51 AM
#7
Frenzied Member
Re: [RESOLVED] [2005] Silver Menu Link the Visual Studio 2005 Menu
-
Apr 22nd, 2006, 03:15 PM
#8
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
Thanks. I'm not sure I'm up to translating all those colors into shades of silver/grey. Maybe later when the program is done though.
-
Apr 22nd, 2006, 03:29 PM
#9
Frenzied Member
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
 Originally Posted by eyeRmonkey
Thanks. I'm not sure I'm up to translating all those colors into shades of silver/grey. Maybe later when the program is done though.
just use system color...i did and it looks very good...
-
Apr 22nd, 2006, 04:15 PM
#10
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
What do you mean "system color." If you mean just leave it as the default, then I agree, it does look fine, but I was hoping for a way to make the menus always look silver (even if the user is on XP and has the style set to Blue or Olive).
-
Apr 22nd, 2006, 05:15 PM
#11
Frenzied Member
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
 Originally Posted by eyeRmonkey
What do you mean "system color." If you mean just leave it as the default, then I agree, it does look fine, but I was hoping for a way to make the menus always look silver (even if the user is on XP and has the style set to Blue or Olive).
sorry...my mistake...wasnt clear enough...
with the class on that link you will get that silver menu appearance that you want...but if you want to change you can use the system colors, like...
VB Code:
'instead of this...
'Return Color.FromArgb(&HC1, 210, &HEE)
'you can use this...
Return Color.FromKnownColor(CType(System.Drawing.KnownColor.ControlDark, KnownColor))
-
Apr 23rd, 2006, 02:26 PM
#12
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
Okay, I haven't tested the code yet, but from what I read, it looked like the code there was for a tan/brown theme. I will try it out later though.
-
Apr 23rd, 2006, 06:48 PM
#13
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
This "silver" colour you speak of that VS uses is not silver at all. It's based on the SystemColors.Control colour. Try changing your theme to the standard XP silver theme and you'll see the difference. Microsoft have individualised VS by not accepting the default colours but they have still tied it into the current XP theme. That's exactly what the SystemColors class is for.
-
Apr 23rd, 2006, 10:12 PM
#14
Thread Starter
No place like 127.0.0.1
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
Oh, I never noticed that. Hmmmm. So which method should I use to achieve the same effect? The one that zuperman linked to or the one he posted an example of? Sorry for seeming slow about this, but I've done it before and I haven't experimented much with it so I'm not even sure what is possible. I mean, to make color scheme like VS do I have to set all those possbile value (gradient start and gradient end for all the different controls)?
-
Apr 23rd, 2006, 10:28 PM
#15
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
Not having ever done this I couldn't tell you what all the details are, but basically if you choose to override the default mechanism for drawing in the .NET environment then you take responsibility for everything. At least with the this renderer technique you don't have to draw all the borders and text and the like yourself, so that is much better than having draw ABSOLUTELY everything. If you want to change colours then you need to specify all the colours you want to use. If you hard-code colours then those colours will be used in all cases. If you use the SystemColors class then the actual colours used will be derived from the current Windows theme. Which you choose to do is up to you, but VS uses the second method. If other parts of your UI are following the system theme then your menus should too, otherwise your UI could end up looking inconsistent on some systems.
-
Apr 24th, 2006, 07:22 AM
#16
Frenzied Member
Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu
 Originally Posted by jmcilhinney
Not having ever done this I couldn't tell you what all the details are, but basically if you choose to override the default mechanism for drawing in the .NET environment then you take responsibility for everything. At least with the this renderer technique you don't have to draw all the borders and text and the like yourself, so that is much better than having draw ABSOLUTELY everything. If you want to change colours then you need to specify all the colours you want to use. If you hard-code colours then those colours will be used in all cases. If you use the SystemColors class then the actual colours used will be derived from the current Windows theme. Which you choose to do is up to you, but VS uses the second method. If other parts of your UI are following the system theme then your menus should too, otherwise your UI could end up looking inconsistent on some systems.
thats what i tried to explain when i mentioned the system colors, some posts ago...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|