RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplication.Terminated Property

Reports whether the application is in the process of shutting down.

Pascal
property Terminated: Boolean;
C++
__property Boolean Terminated;

Terminated is used when calling the ProcessMessages method so that the application doesn't perform unnecessary actions after the shut-down process has been triggered. ProcessMessages sets Terminated to true when it receives a WM_QUIT message. 

An application usually receives a WM_QUIT message because the main window of the application has closed, or because the Terminate method has been called.

Note: For applications using calculation-intensive loops, call ProcessMessages periodically, and also check Terminated to determine whether to abort the calculation and allow the application to terminate.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!