1

How can i seperately get x,y coordinates and events of multiple mouse attached to the system and identify the mouse uniquely in winforms. What about muliple keyboards as well

NOTE: i am not taking about multiple cursors... all i am taking about is some hook which tells me

  • that i have mouse 1 & moise 2 attached to the system
  • and will be able to tell mouse 1 changed its position (x,y) to (x-1,y+1) and mouse 2 changed position (x,y) to (x,y-1)
Moon
  • 19,518
  • 56
  • 138
  • 200
  • Do you want two mice connected to the computer and two mouse cursors? I don't think that is possible. Otherwise, what Stu Mackellar said. – Residuum Sep 01 '09 at 08:05
  • @Residuum - it very much *is* possible; the "surface SDK" does this, for example (although that is a very specific example of the more general multipoint SDK) – Marc Gravell Sep 01 '09 at 09:11
  • please realize that multipoint is the only way to simulate a device besides device simulation framework. If you want specific mouse control and control programs like mouse mischief which do not have a direct programming interface use device simulation framework from Microsoft. – jeffery Aug 08 '13 at 18:50
  • check out this [SO question](http://stackoverflow.com/questions/237155/multiple-mouse-pointers/262789#262789). – Oliver Sep 01 '09 at 08:57

3 Answers3

4

Try the Microsoft MultiPoint SDK which allows you to connect many mice and use them all at the same time (up to 100 I think).

Example Open Source implementation and useful TUIO output from MultiPoint TUIO

badbod99
  • 7,429
  • 2
  • 32
  • 31
0

If you have more than one mouse or pointing device attached to the system then they'll all control the same, single cursor. Hence the coordinates will be the same for all devices.

Keyboards don't have coordinates as far as I'm aware :)

Stu Mackellar
  • 11,510
  • 1
  • 38
  • 59
  • It seems possible to use multiple mouse cursors on Windows, although not very straightforward... See here: http://dailycomputersolutions.com/blog/index.php/2008/11/01/multiple-mouse-cursors-on-a-windows-desktop/ – Thomas Levesque Sep 01 '09 at 08:10
  • I'm going to go ahead and have to upvote this since the "solution" to getting multiple mouse cursors is hacky and crufty at best. – Dave Markle Sep 01 '10 at 01:35
0

I checked through some of the SO "Related" Questions.

This looks very relevant to you.

Community
  • 1
  • 1
maxwellb
  • 13,366
  • 2
  • 25
  • 35