End_Window subroutine
Description
This stored procedure destroys a window and sets focus to the indicated object or to the form’s owner (if any).
Syntax
Call End_Window( FormID, FocusID )
Parameters
Name | Required | Description |
---|---|---|
FormID | Yes | Name of the form to destroy. Must be in upper-case. |
FocusID | No | Name of a PS GUI object to move the focus to when the form is destroyed. Must be in upper-case. If this parameter is not specified the focus is set to the form’s owner (if possible). |
Returns
N/A
Errors
N/A
Remarks
Using this stored procedure means that the specified form is destroyed unconditionally along with its “Window Common Area” (i.e. the Basic+ common variables that contain the form’s synthetic property and semantic data). No attempt is made to release any locks or perform any validation checks.
The preferred way of destroying a form is to call its CLOSE method (which in turn calls End_Window internally). End_Window should only be used as last resort when the CLOSE method fails.
Example
// Example - Terminate a form unconditionally and look to see if it's // handle is still valid. Call End_Window( FormID ) If Get_Property( FormID, "HANDLE" ) Else // Handle invalid - The form was destroyed End
See Also
WINDOW CLOSE method, SYSTEM DESTROY method, Common GUI HANDLE property, Start_Window stored procedure