I am trying to lock the cursor into the form, this is for a mouse locker application, I am trying to dispose the cursor so it will reset the Cursor.Clip when they unlock it.
So far I have:
Cursor.Clip = new Rectangle(x +8, y +30, Size.Width -16, Size.Height -38);
That works fine.
But I cannot figure out how to clear the clip when they unlock it.
I have tried Cursor.Dispose(); But that doesn’t work.
Any ideas?
Thanks.
Set
Clipto aRectanglethat contains the screen’s dimensions.Of course, this won’t work with dual monitor setups, but you get the idea.