[RESOLVED] Tabstrip backcolor
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.
http://img513.imageshack.us/img513/7458/87372274cg0.png
After searching for transparent Frames and Pictureboxes, the best solution seems to be to put a borderless Picturebox on the Tabstrip.
http://img263.imageshack.us/img263/2120/19180012av5.png
Then get the color from the first tab and give the Picturebox (and the controls inside) the same backcolor.
http://img82.imageshack.us/img82/8356/77323461fa4.png
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
Re: [RESOLVED] Tabstrip backcolor
How do i insert tabs in your control?
Re: [RESOLVED] Tabstrip backcolor
Hi,
is there a way to make Chris' method work properly, i mean without command button?
i really like that method..
thank you
Re: [RESOLVED] Tabstrip backcolor
this control may be helpful Here
Re: [RESOLVED] Tabstrip backcolor
yes i saw it once but it's not help me..
i need to use Form_Resize to resize tabstrip and frame, but the fame cannot be resized..
or have you succeed to make it resized?
thank you anyway, i'll post my question in that thread..
Re: [RESOLVED] Tabstrip backcolor
i have been using that control, though i have never resized in runtime.
i don't think da should be a problem. download that latest version and try it again
Re: [RESOLVED] Tabstrip backcolor
Didn't work with me with controls v.5 or v.6 either !!!
at all !!!!
what's wrong !!?:(
Re: [RESOLVED] Tabstrip backcolor
what exactly are you trying to do?
do you have vb6sp6 or vs6sp6 installed?
can you post a sample project
Re: [RESOLVED] Tabstrip backcolor
i'm just tried the code of "Chris001"
but it didn't work ...
i'm using vb6 pro . sp6 !
Re: [RESOLVED] Tabstrip backcolor
please post a sample project