Confines the cursor to a rectangular area on the screen
#include <WinAPIRes.au3>
_WinAPI_ClipCursor ( $tRECT )
$tRECT | $tagRECT structure that contains the screen coordinates of the confining rectangle. If this parameter is 0, the cursor is free to move anywhere on the screen. |
Success: | True. |
Failure: | False, call _WinAPI_GetLastError() to get extended error information. |
The cursor is a shared resource.
If an application confines the cursor, it must release the cursor by using _WinAPI_ClipCursor() before relinquishing control to another application.
Search ClipCursor in MSDN Library.
#include <WinAPIMisc.au3>
#include <WinAPIRes.au3>
_Example()
Func _Example()
_WinAPI_ClipCursor(_WinAPI_CreateRectEx(0, 0, 400, 400))
Sleep(5000)
_WinAPI_ClipCursor(0)
EndFunc ;==>_Example