Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hallo,

in my application the users should move their mice two inch and then an specific action takes place. I do not have the opportunity to instruct the users to move their mice exactly this distance and I do not know which mice they use. Is there any chance to detect the dpi of a mouse device?

I use Visual Basic 2010 Express.

Any help would be much appreciated.

Best Regards,

Ansgar
Posted

1 solution

AFAIK there is no way to tell. Indeed with some pointing devices there is no physical movement that corresponds to one inch anyway - I use a trackman "upside down" mouse that works off thumb movement and the pointer movement on screen bears very little relation to the physical distance my thumb had moved!

Of this is critical to you, then you need to "calibrate" you users mouse to your software …
 
Share this answer
 
Comments
ansgar.feist 6-Dec-13 13:11pm    
Which kind of calibration would you prefer? I think this is not so easy, because if somebody moves a mouse very quick then every 16 ms a mouse move event is raised and the software can get the coordinates of the cursor before and after the mouse move event. So the software can determine distance and speed. But in this case the distance depends on both the velocity of the user and the dpi of the mouse.

For the other characteristics of the mouse move (mouse pointer speed, mouse acceleration, display resolution) i have solutions.

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