简体   繁体   English

(Visual C#) 如何检测鼠标右键?

[英](Visual C#) How to detect right mouse?

I have run into a problem when trying to detect a right-mouse click.我在尝试检测鼠标右键单击时遇到了问题。 I have a for loop set up for (;;) and inside of there need to find out if the right-mouse button is being held down.for (;;)设置了一个 for 循环,在里面需要找出是否按住鼠标右键。 Is there some kind of function I can use?我可以使用某种功能吗?

Thanks in advance!提前致谢!

The best thing I could find was the mousedown and buttonsclick event.我能找到的最好的事情是 mousedown 和 buttonclick 事件。

You can find those pages here and here .您可以在此处此处找到这些页面。

I'd be interested to find a better answer, until then I hope that this is helpful.我有兴趣找到更好的答案,在那之前我希望这会有所帮助。 Good luck.祝你好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM