Directs all the events associated with the mouse toward a specific window or control, regardless of the screen object where the mouse event occurs.
// All the mouse events are directed to the "WIN_WindowName" window
CursorCapture(True, Handle(WIN_WindowName))
Syntax
<Result> = CursorCapture([<Redirection>, ] <Object identifier>)
<Result>: Integer
- Identifier (handle) of the window previously receiving all the mouse messages,
- NULL if no specific window was receiving the mouse events (standard mode).
<Redirection>: Optional boolean
Specifies the management mode of the mouse events:- True (default value): the messages are directed to a window or to a control.
- False: standard management of events.
<Object identifier>: Integer
Handle of the window or control. This identifier is returned by Handle.
Remarks
CursorCapture has no effect when used in the initialization code of the window.