November 17th, 2013, 12:09 PM
Unlimited mouse movement
All I wish to know is how to detect a mouse movement (not like the OnmouseMove event as this is limited to the form or screen) For example if I move the mouse continuously, I do not want to see the cursor, but the co-ordinates must continue to increase or decrease. (in other words, the increments must not stop when I reach the end of the screen). I am designing a mini conveyer belt which turns forward / reverse. Using a standard mouse as my "detector"! By placing an optical mouse slightly above the moving belt, I want to be able to use the mouse as an input for the belt movement. Thus if the belt is moving say one minute forward, I want to be able to record this as mouse increments.
Thus when the belt moves, the mouse increments or (decrements in reverse mode). Unfortunately, the increments stop when I use the OnMouseMove event as the x or y is limited. What I need is a way to unlimited increments or decrements, even in the millions! Eg say the belt starts moving and the mouse reads 0, after say two minutes, the increments will be something in the thousands.
November 17th, 2013, 03:48 PM
The way to accomplish this is to install a mouse hook via a dll that your application uses. There's a good article on how to accomplish this here .
Originally Posted by sihaam