|Navigation: Language Reference > App B - Events > Field-Independent Events >====== EVENT:CloseDown ======|
The application is closing. POSTing this event closes the application. This is the event on which you perform any application cleanup code.
When the Application frame is closing it receives an EVENT:CloseWindow first, then it sends an Event:CloseDown to all child windows. During that event if a child window does an ACCEPT loop CYCLE then the Application frame does not close. When the frame is closing the child windows only receive the EVENT:CloseDown and do not receive an Event:CloseWindow. The Application frame only receives the Event:CloseWindow and not the EVENT:CloseDown.
The IDE, and any programs generated by Clarion, do not automatically shut down when you shut down the Operating System. This allows the user to complete any critical processes or updates and prevents possible data corruption. If you need to shut down applications when the operating system shuts down, you will need to subclass the appropriate window messages in your target application.