473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Set windows form controls transparent?

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!
Nov 16 '05 #1
4 6172
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
"Benny" <an*******@devdex.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
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!

Nov 16 '05 #2
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.

--
Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #3
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
=============
"Benny" <an*******@devdex.com> wrote in message
news:eP**************@TK2MSFTNGP09.phx.gbl...
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!

Nov 16 '05 #4

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!
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: 2003et | last post by:
How To Create Transparent Windows Controls? Thanks
2
by: joe | last post by:
I have a 50% transparent window that is on top of the desktop. I want the user to be able to click 'Through the transparent window' onto objects behind it ... my computer. The transparent...
1
by: FredC | last post by:
I'm using Visual Studio 2003. I have a form with the following controls on it: - a datagrid - several buttons On the forms property page, I have set the Background to an image. The problem: I...
0
by: Tim Marshall | last post by:
A2003. I rather like the appearance I get with windows themed controls turned on, but I'm running into an odd problem with tab controls. When I set the back style to transparent, it really isn't...
3
by: vikash | last post by:
Hi, I want to develop a windows based application using .Net 2.0 The application will have the heavy UI and it will have the lots of drawing to do on the form. So can any one give me the...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
8
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, I know how to make a form transparent and how to create fadein and out effects on forms and controls both. But i dont know how can i make a form transparent but the controls are not...
1
by: Kevinst | last post by:
Hello there, I have got a problem and several approaches but none is really staisfying: Lets assume we have a form. On its surface we have got several animations (like a blinking light). This...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.