Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
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
Posted
Comments
Sergey Alexandrovich Kryukov 16-Jan-13 15:39pm    
How a mouse can log on to Windows? Highly trained? I cannot understand almost nothing...
—SA

1 solution

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:
C#
MultipointMouseEvents.AddMultipointMouseDownHandler(this, this.OnMultipointMouseDown);


and in the event handler you deal with the mouse data:
C#
private void OnMultipointMouseDown(object sender, RoutedEventArgs e)
{
    var args = (MultipointMouseEventArgs)e;
}


you can access the device that sent the event:
C#
args.DeviceInfo


You can know the state of the buttons:
C#
if (args.Buttons == RawMouseButtons.LeftDown)
{
    //do something...
}


Etc... Etc...

The SDK comes with a few easy c# samples.


Valery.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900