CLOSE WINDOW

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


CLOSE WINDOW {(window)}

ParameterTypeDescription
windowWinRefWindow reference number, or
Frontmost window of current process, if omitted

Description

CLOSE WINDOW closes the active window opened by an Open window command in the current process. CLOSE WINDOW has no effect if a custom window is not open; it does not close standard windows. CLOSE WINDOW also has no effect if called while a form is active in the window. You must call CLOSE WINDOW when you are done using a window opened by Open window.

It is useless to pass a number to CLOSE WINDOW when closing a window previously opened by the Open window function, since a call to CLOSE WINDOW will close the last window created by Open window.

If you pass an external window reference number in the extWindowRef parameter, CLOSE WINDOW closes the specified external window. For more information about external windows, refer to the Open external window function.

Example

The following example opens a window and adds new records with the ADD RECORD command. When the records have been added, the window is closed with CLOSE WINDOW:

   Open window (5; 40; 250; 300; 0; "New Employee") 
   Repeat
      ADD RECORD ([Employees])   ` Add a new employee record 
   Until (OK = 0)   ` Loop until the user cancels
   CLOSE WINDOW   ` Close the window

See Also

Open external window, Open window.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next