Navigation: Language Reference > App B - Events > Field-Independent Events >====== EVENT:CloseWindow ====== | |
The window is closing. POSTing this event closes the window. This is the event on which you perform any window cleanup code. Performing an ACCEPT loop CYCLE prevents the Window from closing.
A child window may also be closed by an EVENT:CloseDown sent by the frame when it has received an Event:CloseWindow, in that case no EVENT:CloseWindow occurs before the child window closes.
An Event:CloseWindow can result from a number of actions by the user:
·Pressing the Close X on the Top-Right of the Window
·Selecting Close from the System Menu
·Pressing Escape or Ctrl+F4
·Pressing Ctrl+F4 closes a Child Window
·Pressing Alt+F4 posts Event:CloseWindow to the Application Frame
Rather then trapping any of these individual actions it is best to trap the Event:CloseWindow event.
Performing a BREAK within the ACCEPT LOOP ends the loop immediately and does not send any events. Performing a BREAK in the Frame is generally a bad idea.
See Also: ACCEPT, WINDOW, EVENT:CloseDown.