hWnd Property

Returns the handle of the main A-Shell window.

Syntax

Application.hWnd

Return Value

A Long value containing the window handle of the main A-Shell window.

Remarks

The value returned from the hWnd property may be used with numerous Windows API calls in order to perform more advanced functions or ‘clever’ tricks. For example, the SendMessage API call may be used to send Windows messages other than the WM_CHAR messages sent with the Send method. Alternatively, the SetParent API call could be used to ‘snap’ or contain the A-Shell window into another window or control.

The A-Shell application does not need to be activated or visible in order for the hWnd property to return a valid window handle.