LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse for measuring distance

Hello everyone!

I´ve been trying to make some program to measure the distance "traveled" with my optical mouse connected with USB to my computer.

I´ve checked a lot of the posts, but I could not find what I´m intending to do.

I want to know the distances in X and Y, independent of the monitor´s size, I mean, even if the pointer is at the top of the monitor, if I keep moving it up, to count the vertical distance until I say so, the same with the horizontal movements..

Any advice?

Thank´s!

0 Kudos
Message 1 of 5
(3,253 Views)
For something like this you'd most likely have to delve into operating system calls, since an application would only see what the OS passes to it, and in the case where the mouse is pegged at the top of a monitor and the user keeps moving it up, the app would not see a change in Y coordinates. The OS, on the other hand, would see the messages coming from the mouse and basically "clamp down" on the Y coordinate. What operating system are you using?
0 Kudos
Message 2 of 5
(3,219 Views)

Thanks mercutio! 

I have the Windows XP version 2002.... Which should be the firsts steps to do something like that?

 

 

0 Kudos
Message 3 of 5
(3,178 Views)
Well, without delving into the Windows API I can't give you a direct answer. My suggestion is to look through MSDN since that contains the documentation for the Windows API. You can also try Google to see if anybody has done something similar.
0 Kudos
Message 4 of 5
(3,138 Views)

Thank you mercutio, I will get into it, and see what happens...

see you...

0 Kudos
Message 5 of 5
(3,120 Views)