Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello ,

I have one doubt .How i make transparent form with one button .I need to display only Button . Is that possible or not ? Thanks .
Posted

1 solution

It would be a pretty weird thing, but…

You can do it, but not via transparency. You can (say, temporarily) make a form's Region a small rectangle (or even non-rectangular region) around your button. It won't resize the form. Not only cut out parts of the form will be transparent, they will be transparent even for mouse, so the form will behave as a fragment of a form, with all of the rest cut out. This is the method of making non-rectangular forms, by the way, and the form can be quite complicated, as you can logically combine regions.

All you need is this: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx[^].

Create some desired region object and assign it the the property Region.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900