处理在C#中右键/鼠标左键点击任务栏按钮的 [英] Handling Right Click/Left Click of Task-bar Button in c#

查看:590
本文介绍了处理在C#中右键/鼠标左键点击任务栏按钮的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格(在任务栏中显示任务栏有按钮)和我要处理这个任务栏按钮的左/右点击。我到处找,但可以找到正确的答案。有堆栈溢出贴,以及一些相关的疑问:

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:


  1. <一个href=\"http://stackoverflow.com/questions/963201/using-wndproc-in-c-to-minimize-form-on-leftclick-of-taskbar\">Using的WndProc在C#中任务栏上的leftclick最小化形式

如何检测右键单击任务栏

但是,似乎没有人给予适当的回答怎么办呢?

But, nobody seems to have given a proper answer to "How to do" it?

有没有指针或code段怎么办呢?

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.

推荐答案

您的应用程序并没有得到在任务栏按钮的处理方式有发言权。任务栏被Windows所拥有,并且由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.

对不起。

这篇关于处理在C#中右键/鼠标左键点击任务栏按钮的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆