Hi, I'm using the Tabstrip from Common Controls 5.0 with a manifest file in order to get the XP theme.
When I put a Frame on it, it has a different backcolor than the Tabstrip. The Tabstrip's backcolor is not solid, but gradient and it doesn't have a "BackColor" property either.
After searching for transparent Frames and Pictureboxes, the best solution seems to be to put a borderless Picturebox on the Tabstrip.
Then get the color from the first tab and give the Picturebox (and the controls inside) the same backcolor.
I use GetPixel to get the color from the first tab and it works fine with a Commandbutton, but when using it in the Form_Paint or Form_Initialize event in order to do it automatically, it's too fast and gets the color behind the form (i.e. desktop background).
Is there a solution for this?
vb Code:
Option Explicit Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Private Sub Command1_Click() Dim st As Long, pt As Long st = GetDC(TabStrip1.hwnd) pt = GetPixel(st, 2, 5) Frame1.BackColor = pt Picture1.BackColor = pt End Sub







Reply With Quote