473,796 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6189
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*******@devd ex.com> wrote in message
news:eP******** ******@TK2MSFTN GP09.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*******@devd ex.com> wrote in message
news:eP******** ******@TK2MSFTN GP09.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
6673
by: 2003et | last post by:
How To Create Transparent Windows Controls? Thanks
2
2689
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 window does not need force it just needs to be ontop of all the other windows. another example is .. if you press alt-ctrl-del to bring up task manager how can i program the window to pass mouse clicks on it to the window behined it, if task manger...
1
1749
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 observe that the form displays with the datagrid and the buttons transparent down to the desktop for a significant amount of time. On event frmMain_load, it takes a bit of code ( read time) to build up the info for the datagrid. I believe it is...
0
1772
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 transparent. I'm finding instead of one text box or a button that I'd like to have on the form "shining through" and displaying with all pages, it's as if the tab control keeps the odd colour background it generates. I originally developed the...
3
7654
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 direction how can i handle the different issues that will arise in the same due to paint event and due to other issues.
4
4185
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 check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
11
3478
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 MouseMove, the form is resized around a 30-100 times in one second. This leads to a high CPU utilization and all other application comes to a stand still. The form does not have any controls i.e. buttons, text boxes etc. It is completely...
8
3186
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 transparent they must be visible. Or you can say i want to make my form transparent but i dont want to make controls on the form transparent. Thanx >> ALI <<
1
3023
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 form is not owner drawn. Everything is drawn by child controls. Now we want to go ahead and create an animation that is on top of everything of that form. Lets assume this animation was an arrow that is moving from the top left corner to the...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.