Reputation: 1670
How can I get local position of cursor?
I want (0,0) point to be in top left corner of my window, not the whole screen.
Upvotes: 3
Views: 1786
Reputation: 21776
Cursor.Position
class.
If you want to map global mouse position to your window relative position, then use:
YourFormControl.PointToClient(Cursor.Position)
Upvotes: 5