Vcl.Forms.TCloseEvent
Delphi
TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;
C++
typedef void __fastcall (__closure *TCloseEvent)(System::TObject* Sender, System::Uitypes::TCloseAction &Action);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
type typedef |
public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | Vcl.Forms |
Description
TCloseEvent is the type of a form's OnClose event handle.
The TCloseEvent type points to a method that handles the closing of a form. The Sender parameter is the form that the user tried to close. The Action parameter returns the action you want the form to take when it closes.
Setting Action controls how the form responds to the attempt to close it as shown below :
Value | Meaning |
---|---|
caNone |
The form is not allowed to close, so nothing happens. |
caHide |
The form is not closed, but just hidden. Your application can still access a hidden form. |
caFree |
The form is closed and all allocated memory for the form is freed. |
caMinimize |
The form is minimized, rather than closed. This is the default action for MDI child forms. |