鼠标数据/登录挂钩 [英] mouse data/ logon hook
问题描述
您好,
工业用途,我们想连接2个额外的鼠标。要在单独的应用程序中评估的鼠标数据的位置。我的问题是,确实这样的鼠标自动登录到Windows然后移动鼠标指针。这个我不会。
可以听到我在VendorId的基础上识别提供的鼠标。但是我不知道如何在Windows中压制分配并获取鼠标数据。
你们有没有想法?
非常感谢
Mike
Hello,
for industrial use, we want to connect 2 additional mouse. The position of the mouse data to be evaluated in a separate application. My problem is that is indeed such a mouse automatically logs on to Windows and then move the mouse pointer of course. This I will not.
Could hear the supplied mouse I recognize on the basis of VendorId. But I have no idea how I can suppress the assignment in Windows and get to the mouse data.
Has anyone of you an idea ?
Thank you very much
Mike
推荐答案
你好,
Microsoft有一个用于处理多个鼠标的SDK。使用SDK,您可以从多达25个不同的鼠标中获得输入。
此SDK附带了一套全面的示例。
http://www.microsoft.com/multipoint/mouse-sdk/default.aspx [<一个href =http://www.microsoft.com/multipoint/mouse-sdk/default.aspxtarget =_ blanktitle =新窗口> ^ ]
首先分配一个MultipointMouse事件:
Hello,
Microsoft has an SDK for handling multiple mice. Using the SDK you can get input from up to 25 different mice.
This SDK comes with a comprehensive set of examples.
http://www.microsoft.com/multipoint/mouse-sdk/default.aspx[^]
you start by assigning a MultipointMouse event:
MultipointMouseEvents.AddMultipointMouseDownHandler(this, this.OnMultipointMouseDown);
并在您处理的事件处理程序中使用鼠标数据:
and in the event handler you deal with the mouse data:
private void OnMultipointMouseDown(object sender, RoutedEventArgs e)
{
var args = (MultipointMouseEventArgs)e;
}
您可以访问发送活动的设备:
you can access the device that sent the event:
args.DeviceInfo
你可以知道按钮的状态:
You can know the state of the buttons:
if (args.Buttons == RawMouseButtons.LeftDown)
{
//do something...
}
等...等等...
SDK附带一些简单的c#样本。
Valery。
Etc... Etc...
The SDK comes with a few easy c# samples.
Valery.
这篇关于鼠标数据/登录挂钩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!