[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TApplication.OnModalBegin

Event handler signalled when a form in the application is displayed as a modal form.

## Declaration

Source position: forms.pp line 1757

`public property TApplication.OnModalBegin : TNotifyEvent read FOnModalBegin write FOnModalBegin;`

## Description

OnModalBegin is a TNotifyEvent property with the event handler signalled when a form in the application is displayed as a modal form.

OnModalBegin is signalled from the ModalStarted method, which is called when the form instance calls its ShowModal method. It occurs only once - when the first modal form is displayed. Subsequent events are ignored in ModalStarted when a modal form is already active.

Use OnModalEnd to perform actions needed when the number of modal forms for the application reaches 0 (zero).

## See also

TApplication.ModalStarted |  | Called when a modal form display is started.
TApplicationHandlerType |  | Types of Application notification handlers.