Set windows form controls transparent?

B

Benny

Hello experts,

How can i set windows form controls (i.e. button, label, ...etc) to
transparent? I tried set the control back colour property to
transparent, but it still appear non-transparent.


Thanks,

Benny

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

rawCoder

Hi Benny,

By Transparent, do you mean that you want the form anvas to be visible, or
the desktp to be visible when you set the Control Transparent.

Actually both of these things can be done in a rather simplifid manner -
well actually too simple to be the answer.

Set the visible to false for the control.
Use the transparency Key to inflict a hole on the face of the form.

Hope it helps.
Thank You,
rawCoder
 
M

Morten Wennevik

Hi Benny,

If you set a control's BackColor to Transparent it should be transparent (you can see right through it to the control behind it, usually the Form). You set the TransparencyKey on the form to specify which color should be transparent. To my knowledge this only works on the form not on controls. Alternatively you can use a Form's Opacity to make it partial or fully transparent, including controls.
 
M

Mark Broadbent

as suggested by raw and Morten, if you are trying to see through controls to
the desktop, set the TransparencyKey of the form to a color of your choosing
(use a non-usual one to prevent problems). Then anywhere on the form that
this color has been used (controls and all) will be rendered invisible (or
see-through to the desktop).

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
 
B

Benny

Hello Morten,

How can you set the opacity for controls? I can only see it is available
for forms.


Thanks,

Benny


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top