I have a Winforms control that starts off completely transparent, but then lines are drawn on it for stuff. I want mouse events to completely ignore the control and instead go to the stuff (buttons and all that junk) below.
我有一个Winforms控件,它从完全透明开始,然后在它上面绘制线条。我希望鼠标事件完全忽略控件,而是转到下面的东西(按钮和所有垃圾)。
Is there any way to do this? P/Invoking stuff would be fine, by the way.
有没有办法做到这一点?顺便说一下P /调用东西会很好。
1 个解决方案
#1
I've been looking for a solution to this too. The closest i've come is getting the completely transparent areas to have click-through, by setting the control's Region property to the transparent area. (courtesy of this post: http://bytes.com/topic/visual-basic-net/answers/815914-transparent-user-control-click-through-control-below#post3251154)
我一直在寻找解决方案。我最接近的是通过将控件的Region属性设置为透明区域来获得完全透明的区域以进行点击。 (由此帖提供:http://bytes.com/topic/visual-basic-net/answers/815914-transparent-user-control-click-through-control-below#post3251154)
#1
I've been looking for a solution to this too. The closest i've come is getting the completely transparent areas to have click-through, by setting the control's Region property to the transparent area. (courtesy of this post: http://bytes.com/topic/visual-basic-net/answers/815914-transparent-user-control-click-through-control-below#post3251154)
我一直在寻找解决方案。我最接近的是通过将控件的Region属性设置为透明区域来获得完全透明的区域以进行点击。 (由此帖提供:http://bytes.com/topic/visual-basic-net/answers/815914-transparent-user-control-click-through-control-below#post3251154)