idthiru

Hi

please tell me how to make a control like panel or label transparent so that it shows an image which is a background of the form that contains the controls

thanks in advance


Re: Windows Forms Designer How to make a control transparent

Peter Ritchie

You can't make an individual control opaque on a Form, you can only make the whole for opaque with the Opacity property.




Re: Windows Forms Designer How to make a control transparent

Michael Koster

Setting the BackColor property to Color.Transparent should do what you want.






Re: Windows Forms Designer How to make a control transparent

MrBones

Michael Koster wrote:

Setting the BackColor property to Color.Transparent should do what you want.



It's important to note that when doing this, it's not a true transparency. It's actually making the background color of your control the color of it's parent.




Re: Windows Forms Designer How to make a control transparent

joeycalisay

i second that, bob powell has a post regarding true transparencies for windows forms at bobpowell.net





Re: Windows Forms Designer How to make a control transparent

dr.acv

Like a previous post said at this page:
http://www.bobpowell.net/transcontrols.htm
you can find how to make a transparent control and it works.




Re: Windows Forms Designer How to make a control transparent

Ken_Bussell

The methods provided by Bob Powell work well for tranparent controls, with only one small issue. I've been using this for a while and when the WS_EX_TRANSPARENT is applied to a control, you get some weird effects. The problem I had was that the controls that had this style applied appeared to draw themselves in the z-order backawards. Meaning that the controls that were in the back were drawn in the front. The mouse events still worked correctly, but they were just drawn weird. After working on this for a while with an MS rep, we concluded that this is what it was "supposed" to do, but the effect was still undesirable for my use.



Re: Windows Forms Designer How to make a control transparent

Cold Beer

Does anyone have this Bob Powell code in VB I can't read c# unfortunately but this is the solution that I am looking for. Any help would be appreciated.



Re: Windows Forms Designer How to make a control transparent

krussellm

Of course there is no code in VB, just my luck. Does anyone have this code in VB as the previous person had asked I would greatly appreciate it as I have been looking all over for this solution.




Re: Windows Forms Designer How to make a control transparent

Mick Doherty

You already have this code in VB.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2290716&SiteID=1

Please follow up with questions to your own post, in the thread that you started. If the answers that you are given are not helpful, then say so.