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 LinearGradient
s (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
.