Returns the handle of the object's window.
[ hWnd = ] Object.hWnd
The hWnd property syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
A control or AForm |
A control or AForm object |
|
hWnd |
A number specifying the handle of the control in the window. |
This property is read-only at run time only.
A handle is a non-zero unique number assigned to a window that is used by the operating system to keep track of the attributes of the window.
A value of zero for the handle means there is no window.
The following example opens a form and checks if the form window is destroyed. The frmBrowse variable must be defined as type "Form".
Load frmBrowse
if frmBrowse.hWnd=0
! The form is destroyed
endif
The following example shows how to check if the form window is closed:
Load frmBrowse
if frmBrowse=0
print "The frmBrowse window did not open."
else
while frmBrowse.hWnd
! do something
endwhile
endif
All controls and the AForm.