NotifyIcon.BalloonTipClicked 事件和鼠标按钮
我有一个 NotifyIcon 来表示可下载的应用程序更新。我希望左键单击 NotifyIcon 和左键单击 NotifyIcon 气球(在屏幕上停留 10 秒)即可打开下载页面。
但是,当我处理 BalloonTipClicked 事件时,我无法确定它是左键单击还是右键单击。因此,当气球仍然在屏幕上并且用户右键单击该图标时,我会同时打开弹出菜单和下载页面。
如何检测是否使用了鼠标右键?
I've got a NotifyIcon that signals downloadable application updates. I want the download page to open on a Left Click on the NotifyIcon and on a Left Click on the NotifyIcon balloon (on screen for 10 seconds).
However, when I handle the BalloonTipClicked event I can't figure out if it was a Left or a Right click. Thus, while the balloon is still on screen and the user Right clicks on the icon, I get both the popup menu and the download page opening.
How do I detect the Right mouse button was used?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以尝试用这样的代码测试鼠标状态:
我无法在我的Win7机器上测试它,右键单击气球只是将其关闭并显示任务栏的上下文菜单。我想说这是你的终极敌人。
You could try testing the mouse state with code like this:
I cannot test it on my machine with Win7, right-clicking the balloon just dismisses it and displays the context menu of the taskbar. Which is your ultimate nemesis I'd say.