Determine which mouse was clicked (multiple mice devices) in .NET

Posted by Morten K on Stack Overflow See other posts from Stack Overflow or by Morten K
Published on 2010-03-20T19:04:16Z Indexed on 2010/03/20 20:21 UTC
Read the original article Hit count: 317

Filed under:
|

Hi,

I want to detect when my touchpad is clicked!

I normally use a usb mouse, so I don't use the touchpad for anything. Instead I'd like to make it possible to perform an action in .NET, when the touchpad is clicked. This way I can use it as a shortcut: One tap and something cool happens.

Is this possible, and if yes, any clue how? I'd prefer if it could be working in VB.NET or C#.

My theory is that I'd have to make a mousehook, which then somehow determines which device the click is coming from. If the click is determined to be from the touchpad, then cancel the click and doWhatever().

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about vb.net