开发者

Using C#, how do I lock a mouse inside a window for gaming purposes

开发者 https://www.devze.com 2023-01-24 02:22 出处:网络
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 lo开发者_如何学Gocked inside th

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 lo开发者_如何学Gocked inside the window when the window is active. thanks.


Use Cursor.Clip:

Cursor.Clip = yourForm.RectangleToScreen(yourForm.ClientRectangle);
0

精彩评论

暂无评论...
验证码 换一张
取 消