Sign in Join
FPDoc Onlineexperiment

TCloseEvent procedure type

In unit Forms

Type used for an OnClose event handler in a form.

Declaration

pascal
TCloseEvent = procedure(Sender: TObject; var CloseAction: TCloseAction)
 of object

Arguments

Sender

The form that received an Close request.

CloseAction

Set this to caNone, to prevent the form from closing.

Description

Closing a form can have several meanings:

caNone
Do nothing (don't close).
caHide
Hide the form (default for modal forms).
caFree
Destroy the form.
caMinimize
Minimize the form (MDI child default).

The handler can set CloseAction to the desired value for the action.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.