I took a few minutes to make a vista-lookalike label, Vista itself is basically crap but the color scheme can look nice if implemented properly.
Usage: Drop it on the form, use it.
To have it revert to a standard label set the VistaLabel's VistaStyle property to false.
VB.NET:
Option Explicit On
Option Strict On
Option Infer Off
Public Class VistaLabel
Inherits System.Windows.Forms.Label
Private _VistaStyleBoolean As Boolean = True
Private _gradientBegin As Color = Color.FromArgb(4I, 80I, 130I)
Private _gradientEnd As Color = Color.FromArgb(28I, 120I, 133I)
Public Sub New()
MyBase.AutoSize = False
Me.AutoSize = False
Me.Size = New Size(110I, 35I)
Me.MinimumSize = New Size(89I, 25I)
Me.Font = New Font("Microsoft Sans Serif", 10.0!, FontStyle.Regular)
Me.ForeColor = Color.WhiteSmoke
Me.TextAlign = ContentAlignment.MiddleLeft
End Sub
Public Property VistaStyle() As Boolean
Get
Return _VistaStyleBoolean
End Get
Set(ByVal value As Boolean)
If _VistaStyleBoolean <> value Then
_VistaStyleBoolean = value
Me.Refresh()
End If
End Set
End Property
Private Sub VistaLabel_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
If Me._VistaStyleBoolean = True Then
Dim pt As Point
Dim sz As SizeF = e.Graphics.MeasureString(Me.Text, Me.Font, Me.Width)
Using b As New System.Drawing.Drawing2D.LinearGradientBrush(New Rectangle(0I, 0I, Me.Width, Me.Height), _gradientBegin, _gradientEnd, Drawing2D.LinearGradientMode.Horizontal)
e.Graphics.FillRectangle(b, New Rectangle(0I, 0I, Me.Width, Me.Height))
End Using
Select Case Me.TextAlign
Case ContentAlignment.TopLeft
pt = New Point(0I, 1I)
Case ContentAlignment.TopCenter
pt = New Point(CInt((Me.Width / 2I) - (sz.Width / 2I)), 1I)
Case ContentAlignment.TopRight
pt = New Point(Me.Width - CInt(sz.Width), 1I)
Case ContentAlignment.MiddleLeft
pt = New Point(0I, CInt((Me.Height / 2I) - (sz.Height / 2I)))
Case ContentAlignment.MiddleCenter
pt = New Point(CInt((Me.Width / 2I) - (sz.Width / 2I)), CInt((Me.Height / 2I) - (sz.Height / 2I)))
Case ContentAlignment.MiddleRight
pt = New Point(Me.Width - CInt(sz.Width), CInt((Me.Height / 2I) - (sz.Height / 2I)))
Case ContentAlignment.BottomLeft
pt = New Point(0I, Me.Height - CInt(sz.Height))
Case ContentAlignment.BottomCenter
pt = New Point(CInt((Me.Width / 2I) - (sz.Width / 2I)), Me.Height - CInt(sz.Height))
Case ContentAlignment.BottomRight
pt = New Point(Me.Width - CInt(sz.Width), Me.Height - CInt(sz.Height))
End Select
e.Graphics.DrawString(Me.Text, Me.Font, New SolidBrush(Me.ForeColor), pt.X, pt.Y)
End If
End Sub
End Class
To have it revert to a standard label set the VistaLabel's VistaStyle property to false.