PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Office 2007 Menu/Toolstrip ColorTable-VBForums
Results 1 to 5 of 5

Thread: Office 2007 Menu/Toolstrip ColorTable

Hybrid View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Office 2007 Menu/Toolstrip ColorTable

    Hey,

    Here is my latest Toolstrip Renderer (well actually, just a ColorTable) that mimicks the Office 2007 menustrip and toolstrip look as closely as possible. Since Office 2007 usually uses a Ribbon, I based my example on Visio 2007, which does not use a Ribbon. It seems that most third party software takes the Visio look as standard too, so I figured I should follow them


    Screenshots:




    The attached class is a ProfessionalColorTable which you assign to a ToolstripProfessionalRenderer. The renderer then uses the colors defined in the color table class. If you then assign an instance of that renderer to the Renderer property of the MenuStrip and ToolStrip, you get the colors as defined in the color table.

    In short, this is how you use it:
    1. Add the attached class to your project
    2. Add a normal MenuStrip and ToolStrip to your form
    3. Assign their Renderer property like so:
    vb.net Code:
    1. Dim r As New ToolStripProfessionalRenderer(New Office2007ColorTable)
    2.         MenuStrip1.Renderer = r
    3.         ToolStrip1.Renderer = r
    (This assumes your MenuStrip is called MenuStrip1, your ToolStrip is called ToolStrip1, and the color table class you downloaded from this post is still called Office2007ColorTable. If not, replace these names with your own names obviously.

    I would usually run that code in the Form_Load event, or possibly in the constructor (Public Sub New) of the relevant form.


    Enjoy!
    Attached Files Attached Files

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Office 2007 Menu/Toolstrip ColorTable

    I dont see the difference between that and the Office 2003 colour scheme - am I missing something?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Office 2007 Menu/Toolstrip ColorTable

    Ah I see, fair enough it is very similar though :P
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width