|
Private Sub TabControl1_DrawItem(sender As System.Object, e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem
Static PutBackColor As Boolean = False
If PutBackColor = False Then
e.Graphics.FillRectangle(New SolidBrush(<BackColor>), 0, 0, Me.TabControl1.Width, Me.TabControl1.Height)
PutBackColor = True
End If
e.Graphics.FillRectangle(New SolidBrush(<BackColor>), e.Bounds.X - 2, e.Bounds.Y - 2, e.Bounds.Width + 2, e.Bounds.Height + 2)
e.Graphics.DrawString(Me.TabControl1.TabPages(e.Index).Text, e.Font, <ForeColor>, e.Bounds.X + 5, e.Bounds.Y + 5)
If e.State = DrawItemState.Selected Then
PutBackColor = False
End If
End Sub
|
|
|
|