Vcl.Forms.TApplication.Terminated
Delphi
property Terminated: Boolean read FTerminate;
C++
__property bool Terminated = {read=FTerminate, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | TApplication |
Description
Reports whether the application is in the process of shutting down.
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.