Click here to Skip to main content
15,512,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Would need a transparent rectangle with opacity (100x100px) anywhere on my form1. TransparencyKey is transparent but not clickable. (Transparency key is often used for screenshots) I had the code but lost the code. Don't need screenshots because i must be able to start programs with mousclick in this free transparent rectangle on the form as it would be no application there but as part of the application. Around the transparent rectangle i can paint rectangle lines(for example 2px or more). It's normally a rectangle code ( with no opacitiy and lines around integrated in the code. Now i know the opacity must be less than 0.5 to be clickable. There was a short source code. Hope someone can help.

Thank you

What I have tried:

I searched Visual C# code snippets and examples. After i found the code i transformed the code to my VB-Project and it went perfectly on my application. My project was lost after a renew of my Windows system
Gerry Schmitz 9-Oct-18 13:30pm    
What's the point of this "rectangle".

(And "opacity" has nothing to do with "clickability"; even if it "looks" like it does)
Member 14013452 9-Oct-18 13:41pm    
Hi, Gerry! Thanks for the question. The windows form normally is gray (Windows gray) If the opacity of a rectangle on this form opacity = 0, in the transparent rectangle i should be able to start any desktop program. Is the opacity more than 0.5 then not. i am very sure. If not you could help me if possible. On the windows form application i want crop out a rectangle by selection. Then i lay a transparent rectangle with lines over this field. this opacity should be less than 0.5. The points could be x 100, y 100
Member 14013452 9-Oct-18 14:13pm    
The first rectangle should be the cropped by selection (x,y) [no real rectangle] the second transparent rectangle is GUI. Each other have own coordinates i think.
Gerry Schmitz 9-Oct-18 14:21pm    
I still don't follow: what does a "rectangle" have to do with "starting a desktop program"?

Are you using "rectangles" instead of "buttons"?

Buttons you can disable / enable; and a "disabled" button will show as such.

And "grey forms" are an "old" "standard"; circa Windows 3.0.

"White, flat and thin" is (now) in.
Member 14013452 9-Oct-18 14:23pm    
it should not be a rectangle shape and no picturebox. because they can be transparent and i can see the desktop background but i can not open a program or something.

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