Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm working in C#, in Visual Studio, and I'm trying to make a transparent form - entirely transparent, though not click-through - without making the title bar transparent, so that there's still something to move the (invisible) window around and (most importantly) close it.

It'd also be nice if the window had visible borders, but that may be a separate question.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
436 views
Welcome To Ask or Share your Answers For Others

1 Answer

If I understand your question correctly, you can Use TrancparencyKey

Set TrancparencyKey and BackColor properties both to same color like Color.Red.

Here is the screenshot of transparent form over visual studio:

enter image description here

Note:

  • When you use for example Color.Red every thing works fine and you can handle mouse Click. But the behavior is different for different colors, for example Color.Magenta the form can not capture the mouse Click.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...