积极答复者
求助鼠标事件里 如何获取硬件ID(硬件范例ID)

问题
-
我需要的功能:电脑接两个鼠标,程序中判断由哪个鼠标点击元素
XMAL代码
<Window ... Mouse.MouseDown="Window1_MouseDown">...</Window>cs代码
...//由ManagementObjectSearcher mouseQ=new ManagementObjectSearcher("select * from Win32_PointingDevice"); 来获取鼠标集合
private void Window1_MouseDown(object sender, MouseButtonEventArgs e)
{
//这里我该如何获取鼠标ID e.Device ,e.MouseDevicef都没有便件ID
}- 已移动 ThankfulHeart 2013年6月28日 5:15 WPF问题
答案
-
可以试一下这个http://www.microsoft.com/multipoint/mouse-sdk/developer.aspx
Min Zhu
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 就一铜币 2013年6月29日 2:22
全部回复
-
WPF问题吗?
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at: Spam Report -
需要切换输入方式到raw input,但是这样WPF不会自动投递raw input的鼠标消息到你的事件处理。
参考http://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard
Visual C++ MVP -
可以试一下这个http://www.microsoft.com/multipoint/mouse-sdk/developer.aspx
Min Zhu
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- 已标记为答案 就一铜币 2013年6月29日 2:22