Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a Tabcontrol Transparent

Status
Not open for further replies.

one234

IS-IT--Management
Mar 8, 2003
728
GB
Hello All,

I'm making a Visual Basic .NET program.

I've created a from with a Tab control and some other controls.

I also added a background image for the form and made all controls transparent so you can see the image through the control.

The problem is that I'm unable to make the tab control transparent. So now I have a nice background with a big grey square in the middle [evil]

Could somebody tell me how I can make the tab control transparent?!?!?!?

TIA!!



Marc D.

If Bill Gates had a nickel for every time Windows crashed... Oh wait, he does...
 
or try this site


Controls with a "Transparent" color actually render their parent's background, so you're seeing the White background of the Form, not the PictureBox. Three easy ways to deal with this:


Use a Panel with it's "BackgroundImage" property set instead of a PictureBox, and parent the LinkLabels to the panel (PictureBoxes generally don't have children)
Set the BackgroundImage of the Form to the image (basically the same as 1 above, but avoids the extra control)
In code, set the Parent of the LinkLabel to be the PictureBox. You'll need to update the LinkLabel's position to match the new origin of the parent if the PictureBox isn't at (0,0)
(Shawn Burke on microsoft.public.dotnet.framework.windowsforms newsgroup)

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top