SetWaitCursor method


Prototype

SetWaitCursor Proto hWnd:HWND

Syntax

Invoke SetWaitCursor, hWnd

Function

Changes the cursor shape to an hourglass and captures the mouse.

Parameters

hWnd

Handle to the object which will capture the mouse.

Return value

None


REMARKS
: You should call this method while performing a task which may last for a certain period of time, so that the hourglass mouse pointer warns the user that he/she has to wait. As the method makes the object (hWnd) to capture the mouse, you must call
SetDefautCursor after performing the task, so that the mouse is released. If not, it will remain captured and you will loose all mouse control on your application.

IMPORTANT: Each call to this method must match a call to SetDefautCursor.