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:
  1. Option Explicit
  2.  
  3. Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long
  4. Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
  5.  
  6. Private Sub Command1_Click()
  7.     Dim st As Long, pt As Long
  8.    
  9.     st = GetDC(TabStrip1.hwnd)
  10.     pt = GetPixel(st, 2, 5)
  11.    
  12.     Frame1.BackColor = pt
  13.     Picture1.BackColor = pt
  14. End Sub