Reputation: 71
I wanted to add this feature to my program but I don't know what to google or the functions needed to do this. Its for Wacraft3 on window mode. I want the mouse to get locked inside the window when the window is active. thanks.
Upvotes: 2
Views: 2254
Reputation: 263047
Use Cursor.Clip:
Cursor.Clip = yourForm.RectangleToScreen(yourForm.ClientRectangle);
Upvotes: 4