You have to override the BackColor property of the control.
Add the following class to your project
*********************
Public Class ColorTabCtrl
Inherits System.Windows.Forms.TabControl
'ColorTabCtrl
Private ColorVarBackColor As Color =
System.Drawing.SystemColors.ActiveBorder
Overrides Property BackColor() As Color
'Sets the method for retrieving the value of your property.
Get
Return ColorVarBackColor
End Get
'Sets the method for setting the value of your property.
Set(ByVal Value As Color)
ColorVarBackColor = Value
End Set
End Property
End Class
***********
To use ColorTabCtrl, go to Form1 declaration section for TabControl. By
default it should have
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
replace above code with following line
Friend WithEvents TabControl1 As ColorTabCtrl
*************
By default, Sub InitializeComponent() have follwoing code
Me.TabControl1 = New System.Windows.Forms.TabControl()
replace above code with following line
Me.TabControl1 = New ColorTabCtrl()
*************
Set BackColor for TabControl
Me.TabControl1.BackColor = System.Drawing.Color.Blue
*****************************
Good Luck!
Shawn Shelton
mikl wrote:
How do you change the overall background color for a tab
control (not on each individual tab).
I tried Tabcontrol1.Backcolor = System.Drawing.Color.Blue
but this did not work.
Thanks
mikl