VC# Multiple Mouse

吃可爱长大的小学妹 提交于 2019-12-24 08:23:19

问题


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)

回答1:


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




回答2:


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 :)




回答3:


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

This looks very relevant to you.



来源:https://stackoverflow.com/questions/1361073/vc-multiple-mouse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!