Can I create a window whose client area is transparent (using the transparency key) and click?

Using C #, I create a window whose border is normal, but the client area is transparent (using the transparency key). In XP, I was able to click this (access to elements below the transparent area); however this does not work on W7. Is there a way to make this work for W7 (and XP)?

UPDATE: Thanks everyone for the quick answers! It seems that the key to my problem was the unfortunate fact that I used YELLOW as the transparency key. I wanted it to stand out in Visual Studio, so I remember that it was transparent; and this color choice is what responded to the click. As soon as I switched to gray, it worked fine.

+3
source share
2 answers

According to this post , the workaround is to set the TransparencyKey toGray

  this.BackColor = Color.Gray;
  this.button1.BackColor = Color.Blue;
  this.TransparencyKey = Color.Gray;
+2
source
this.TransparencyKey = this.BackColor;

This works fine for me on Windows 7.

enter image description hereenter image description here

0
source

All Articles