在c#中处理任务栏按钮的右键单击/左键单击
我有一个表单(任务栏中显示任务栏按钮)并且我想处理此任务栏按钮的左/右键单击。我到处搜索但能找到正确的答案。 stack-overflow 中也发布了一些相关查询:
但是,似乎没有人对“如何做”给出正确的答案呢?
有没有任何指针或代码片段如何做到这一点?
请注意,我说的是任务栏应用程序按钮(请不要与系统托盘菜单或通知区域混淆)。我之所以明确指出这一点,是因为我在好几个地方都看到过这种混乱。
I have a form (having Taskbar button shown in Taskbar) and I want to handle left/right clicks of this Task-bar button. I searched everywhere but could find the right answer. There are some related queries posted in stack-overflow as well:
But, nobody seems to have given a proper answer to "How to do" it?
Is there any pointers or code snippet how to do it?
Please note that I am talking about Task-bar app button (please don't confuse with Systray menu or Notification area). I have explicitly stated it because I have seen this confusion several places.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的应用程序对于如何处理任务栏按钮没有发言权。任务栏归窗口所有,并由窗口用来控制应用程序窗口的显示和定位。基本上你的请求在 Windows 游乐场中是越界的。
对不起。
Your application doesn't get a say in how the task bar button is handled. The task bar is owned by windows, and is used by windows to control display and positioning of your application's windows. Basically your request is out-of-bounds in the windows playground.
Sorry.
你可以做的是使用 ApicodePack 库中的 TaskbarManager
Windows 7 任务栏 C# 快速参考
您能够处理此类事件的地方。
what you can do is to use TaskbarManager out of the ApicodePack library
Windows 7 Taskbar C# Quick Reference
where you are able to handle such events.