4D v16.3

CLOSE WINDOW

Home

 
4D v16.3
CLOSE WINDOW

CLOSE WINDOW 


 

CLOSE WINDOW {( window )} 
Parameter Type   Description
window  WinRef in Window reference number, or Frontmost window of current process, if omitted

CLOSE WINDOW closes the active window opened by the Open window or Open form window command in the current process. CLOSE WINDOW has no effect if a custom window is not open; it does not close system 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 or Open form window.

It is useless to pass a number to CLOSE WINDOW when closing a window previously opened by the Open window or Open form window function, since a call to CLOSE WINDOW will always close the last window created by one of these commands.

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

Example  

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

 FORM SET INPUT([Employees];"Entry")
 $winRef:=Open form window([Employees];"Entry")
 Repeat
    ADD RECORD([Employees]//Add a new employee record
 Until(OK=0) //Loop until the user cancels
 CLOSE WINDOW //Close the window



See also 

_o_Open external window
Open form window
Open window

 
PROPERTIES 

Product: 4D
Theme: Windows
Number: 154

 
HISTORY 

Created: < 4D v6

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)