|
-
Feb 2nd, 2008, 09:06 AM
#1
Thread Starter
Frenzied Member
[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.

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
-
Feb 2nd, 2008, 11:53 AM
#2
Addicted Member
Re: Tabstrip backcolor
Hello Chris,
On my site you will find some transparent controls source code, have a look if they are useful for you.
HTH
Jottum™
XpVistaControls , (transparent) usercontrols for XP, Vista and 7 with W2K legacy support.
-
Feb 2nd, 2008, 05:45 PM
#3
Thread Starter
Frenzied Member
Re: Tabstrip backcolor
Thanks Jottum
-
May 6th, 2009, 09:29 AM
#4
Fanatic Member
Re: [RESOLVED] Tabstrip backcolor
How do i insert tabs in your control?
-
May 7th, 2009, 05:12 AM
#5
Fanatic Member
Re: Tabstrip backcolor
 Originally Posted by Jottum
Hello Chris,
On my site you will find some transparent controls source code, have a look if they are useful for you.
HTH
Hello thanks for all the control you are great.
But it seems i cannot use onle vbframe and vbtabstrip control with you code or can i. i have tried so many time it either complain of one error or the other when i try to put it im my code.
Can you do me a favour. pls do a project with xpstyle one tabstrip and a frame on it only
or is it only with your frame that i get the transparency.
Am using vbtabstrip and vbframe
Thanks once again
-
Feb 1st, 2010, 03:58 AM
#6
Addicted Member
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
-
Feb 2nd, 2010, 03:14 PM
#7
Fanatic Member
Re: [RESOLVED] Tabstrip backcolor
this control may be helpful Here
-
Feb 2nd, 2010, 06:23 PM
#8
Addicted Member
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..
-
Feb 3rd, 2010, 02:04 PM
#9
Fanatic Member
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
-
Mar 3rd, 2010, 10:37 PM
#10
New Member
Re: [RESOLVED] Tabstrip backcolor
Didn't work with me with controls v.5 or v.6 either !!!
at all !!!!
what's wrong !!?
-
Mar 4th, 2010, 04:41 AM
#11
Fanatic Member
Re: [RESOLVED] Tabstrip backcolor
what exactly are you trying to do?
do you have vb6sp6 or vs6sp6 installed?
can you post a sample project
-
Mar 7th, 2010, 08:23 AM
#12
New Member
Re: [RESOLVED] Tabstrip backcolor
i'm just tried the code of "Chris001"
but it didn't work ...
i'm using vb6 pro . sp6 !
-
Mar 12th, 2010, 04:10 AM
#13
Fanatic Member
Re: [RESOLVED] Tabstrip backcolor
please post a sample project
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|