Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Adding an Office 2007 Style to your StatusStrip!

0.00/5 (No votes)
21 Nov 2006 1  
An easy way to get the new look in your application...

Sample Image - statusstrip_demo.jpg

Introduction

I'm a young German student, so please forgive my bad English... This year, I installed the new Office Suite by Microsoft, and from the first minute using it, I really got fond of the nice GUI, especially the good-looking statusbar. Because I never saw a tutorial on how to do a similar background (I saw some tutorials to draw single items) I decided to take the chance and write one myself.

How it works

At first, I added the Double-Buffer functionality by using this code (posted for absolute beginners):

Public Sub New() 
    Me.DoubleBuffered = True 
    InitializeComponent() 
End Sub

To draw the background, you need the On_Paint event. The only thing to do is to draw the border on top and two LinearGradients (duration 1:2). If the SizingGrip should be painted (Me.SizingGrip = True), you should do it. To get the bounds to draw the SizingGrip, you can use this code:

Dim sgb As Rectangle = Me.SizeGripBounds

Using the Code

You can simply add the control to the toolbox and use it like a "regular" StatusStrip.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here