Click here to Skip to main content
12,349,582 members (28,615 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# VB VB.NET
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 16-Jan-13 7:56am
MikeBi467
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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...
}

Etc... Etc...

The SDK comes with a few easy c# samples.


Valery.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 19 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100