There's always a way, just sometimes it is difficult to find, or a lot of
work.
In this case you need to fully take over the TabControls Drawing. Heres some
code for you to play with.
SetStyle(ControlStyles.AllPaintingInWmPaint Or _
ControlStyles.ResizeRedraw Or _
ControlStyles.UserPaint Or _
ControlStyles.DoubleBuffer, True)
Private m_BackColor As Color = Color.Blue
<DefaultValue(GetType(Color), "Blue"), _
Browsable(True)> _
Public Shadows Property BackColor() As Color
Get
Return m_BackColor
End Get
Set(ByVal Value As Color)
If Not m_BackColor.Equals(Value) Then
m_BackColor = Value
Invalidate()
End If
End Set
End Property
Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
e.Graphics.Clear(m_BackColor)
'Draw the tab items
Dim ItemBounds As Rectangle
Dim TextBrush As New SolidBrush(Color.Empty)
For TabIndex As Integer = 0 To Me.TabCount - 1
ItemBounds = Me.GetTabRect(TabIndex)
ControlPaint.DrawBorder3D( _
e.Graphics, ItemBounds, _
Border3DStyle.Bump, _
Border3DSide.All)
Dim sf As New StringFormat
sf.LineAlignment = StringAlignment.Center
sf.Alignment = StringAlignment.Center
If Me.SelectedIndex = TabIndex Then
TextBrush.Color = Color.Red
Else
TextBrush.Color = Me.ForeColor
End If
e.Graphics.DrawString( _
Me.TabPages(TabIndex).Text, _
Me.Font, TextBrush, _
RectangleF.op_Implicit(Me.GetTabRect(TabIndex)), _
sf)
Next
End Sub