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

# TCustomTaskDialog.OnDialogCreated

Event handler signalled when a form instance has been created for the dialog.

## Declaration

Source position: dialogs.pp line 848

`public property TCustomTaskDialog.OnDialogCreated : TNotifyEvent read FOnDialogCreated write FOnDialogCreated;`

## Description

OnDialogCreated is a TNotifyEvent property with the event handler signalled after a new dialog form instance has been created for the class. It is signalled (when assigned) in the DoOnDialogCreated method, and occurs when the dialog form is created for the class instance.

For native implementations using the Task Dialog API (supported Windows versions), it occurs when the TDN_CREATED notification is handled in the callback routine for the class instance. For emulated task dialog forms, it occurs when the TLCLTaskDialog.CreateNew method is called. It is the last action performed in the method, and allows the caller to be notified when the LCL form instance is valid and available to the TTaskDialog owner.

## Version info

Added in LCL version 4.0.

## See also

TCustomTaskDialog.DoOnDialogCreated |  | Signals the OnDialogCreated event handler (when assigned).
TLCLTaskDialog.CreateNew |  | Alternate constructor for the class instance.