Hwnd Property

You can use the hWnd property to determine the handle (a unique Long Integer value) assigned by Microsoft Windows to the current window. Read/write Long.

expression.Hwnd

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property is available only by using a macro or Visual Basic.

You can use this property in Visual Basic when making calls to Windows application programming interface (API) functions or other external routines that require the hWnd property as an argument. Many Windows functions require the hWnd property value of the current window as one of the arguments.

Caution   Because the value of this property can change while a program is running, don't store the hWnd property value in a public variable.