I found this online somewhere, hope this helps
Public Class ColoredStatusBar
Inherits StatusBar
Private m_BackColor As Color = Color.Blue
Public Sub New()
MyBase.New()
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
End Sub
Public Shadows Property BackColor() As Color
Get
Return m_BackColor
End Get
Set(ByVal Value As Color)
m_BackColor = Value
Me.Invalidate()
End Set
End Property
Protected Overrides Sub OnPaint( _
ByVal e As System.Windows.Forms.PaintEventArgs)
e.Graphics.FillRectangle(New SolidBrush(Me.BackColor), _
e.ClipRectangle)
e.Graphics.DrawString(Me.Text, Me.Font, New SolidBrush(Me.ForeColor), _
e.ClipRectangle.X, e.ClipRectangle.Y)
If Me.SizingGrip = True Then
ControlPaint.DrawSizeGrip(e.Graphics, Me.BackColor, e.ClipRectangle)
End If
End Sub
End Class
"Fred Morrison" <fm*******@erols.com> wrote in message
news:en*************@TK2MSFTNGP11.phx.gbl...
OK, the direct method of setting the background color on a text-only (no
panels) statusbar control seems to fail:
Me.StatusBar1.Text = "<whatever> failed.>
Me.StatusBar1.Backcolor = Color.Yellow ' nothing changes
Me.StatusBar1.Refresh ' doesn't help either.
What convoluted work-around (must be if the simple, direct method fails)
is there for this?