Understanding Transparency Key Transparency Configuration Behavior in C#Form

Asked 5 months ago, Updated 5 months ago, 20 views

Thank you for your help.

I asked about transparent form through Transparency Key before, but it hasn't been resolved yet, so
Let me ask you one more question.

If you set TransparencyKey to Form and transparent the form, the transparent part (the appropriate color part of TransparencyKey) will slip through the form and mouse events will appear on the back. I think I was able to run and operate as if I had a cut-out form.Various
I'm looking at the website and it certainly looks like that.As is the case with the website below.


However, if you do the same thing these days, it's apparently transparent, but it slips through the transparent part
You cannot operate on the back.A mouse event occurs while the form remains rectangular to the end.

Since when did this specification come into this specification?It's not a defect, it's an official specification
If so, will this specification remain the same from now on?

Personally, I liked it because I was able to do something more interesting before, but I'm a little disappointed.

If anyone knows the details, could you please let me know?

Thank you for your cooperation.

c# form

2022-09-30 11:03

1 Answers

The link I followed from Kunif's comment gave me a complete answer.

Transparent color




allows you to mouse-click through the color of the background as desired.

Depending on the color, mouse events do not appear to be transparent.

上記 I have confirmed that the above two colors are transparent.


Also, turning on and off the Aero function in Windows will change this behavior.

2022-09-30 11:03

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.