0

Hi,
I want to move the mouse pointer only on snap points which may be float or int value .My graphics unit is in millimeter.

Cursor.Position accepts only int value. So is there some other method or procedure from which it can be done.

For example

I want the mouse pointer to move on 2.5 multiples.

(100 , 50) (102.5, 50)........
(100,52.5) (102.5, 52.5)................
..............................

Thanks

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by sknake
0

The mouse position is in pixels which is relative to the display settings on the display adapter. You can do the math yourself to convert the values. Can you upload a sample project demonstrating the drawing unit where you want to snap the cursor? You may be better off drawing a "Dot" below the cursor that snaps to the nearest segment instead of snapping the actual cursor because that will make it very "jerky" to use. But you could allow the pointer to free float and just draw a bold * on the snapped coordinates.

To my knowledge I have never seen software that snaps the cursor like you are describing.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.