且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#右键单击按钮不会引发mouseclick事件

更新时间:2023-12-06 12:11:40

显然,答案是 OnClick 不处理 Button 的右键单击事件。因此,解决方案是使用 MouseUp / MouseDown 并检查双击/单击鼠标中途打开/关闭的位置通过手动操作。

Apparently the answer to this is that OnClick does not handle right click events for Buttons. The solution was therefore to use MouseUp/MouseDown and check for double clicks/clicks where the mouse moves on/off halfway through manually.