Results 1 to 16 of 16

Thread: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu

  1. #1

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Resolved [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.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    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
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,470

    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.

  4. #4

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,470

    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.

  6. #6

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  7. #7
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] [2005] Silver Menu Link the Visual Studio 2005 Menu

    Help keep this forum clean: Remember to mark your thread as resolved Search before you post Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    NuGet package Manager PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    4096 MB, DDR3 PC3-8500F (533 MHz), Kingston ATI Mobility Radeon HD 5470 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    VB.NET JAVA PHP Javascript
    Other:
    XML
    HTML CSS JQuery SQL



    *** Proudly Portuguese ***

  8. #8

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  9. #9
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu

    Quote 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...
    Help keep this forum clean: Remember to mark your thread as resolved Search before you post Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    NuGet package Manager PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    4096 MB, DDR3 PC3-8500F (533 MHz), Kingston ATI Mobility Radeon HD 5470 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    VB.NET JAVA PHP Javascript
    Other:
    XML
    HTML CSS JQuery SQL



    *** Proudly Portuguese ***

  10. #10

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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).
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  11. #11
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu

    Quote 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:
    1. 'instead of this...
    2. 'Return Color.FromArgb(&HC1, 210, &HEE)
    3. 'you can use this...
    4. Return Color.FromKnownColor(CType(System.Drawing.KnownColor.ControlDark, KnownColor))
    Help keep this forum clean: Remember to mark your thread as resolved Search before you post Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    NuGet package Manager PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    4096 MB, DDR3 PC3-8500F (533 MHz), Kingston ATI Mobility Radeon HD 5470 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    VB.NET JAVA PHP Javascript
    Other:
    XML
    HTML CSS JQuery SQL



    *** Proudly Portuguese ***

  12. #12

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  13. #13
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,470

    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.

  14. #14

    Thread Starter
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    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)?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  15. #15
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,470

    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.

  16. #16
    Frenzied Member zuperman's Avatar
    Join Date
    Dec 2000
    Location
    Portugal
    Posts
    1,033

    Re: [RESOLVED] [2005] Silver Menu Like the Visual Studio 2005 Menu

    Quote 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...
    Help keep this forum clean: Remember to mark your thread as resolved Search before you post Remember to rate posts that help

    VS2010: Visual Studio 2010 Keybinding Posters
    Service Pack 1
    Tools: GhostDoc - automatically generates XML documentation comments
    NuGet package Manager PowerCommands IDE extensions
    Source Control: ankhsvn - integration for SVN
    Windows Shell Extension for Subversion

    Development Laptop: Intel Core i5 430M 2.26 GHz @ 2.53 GHz
    4096 MB, DDR3 PC3-8500F (533 MHz), Kingston ATI Mobility Radeon HD 5470 15.6 @ 16:9, 1366x768 pixel, HD LED LCD

    I follow:
    JoelOnSoftware - A weblog by Joel Spolsky, a programmer working in New York City, about software and software companies
    ScottGu's Blog - Scott Guthrie works for Microsoft as the Product Manager of the .NET Framework
    Portugal-a-Programar - Portuguese Developers Community
    .NET Rocks! - is a weekly Internet audio talk show for .NET Developers.

    Programming Languages:
    C#
    VB.NET JAVA PHP Javascript
    Other:
    XML
    HTML CSS JQuery SQL



    *** Proudly Portuguese ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width