Function Reference


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.

Return Value

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.

See Also

Search ClipCursor in MSDN Library.


#include <WinAPIMisc.au3>
#include <WinAPIRes.au3>

_WinAPI_ClipCursor(_WinAPI_CreateRectEx(0, 0, 400, 400))