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

# TCustomForm.OnCreate

Handler called when the form has been created.

## Declaration

Source position: forms.pp line 801

`public property TCustomForm.OnCreate : TNotifyEvent read FOnCreate write FOnCreate;`

## Description

OnCreate is a TNotifyEvent property which implements an event handler signalled when a new form instance is created. OnCreate can be used to perform any action needed to configure the new form instance, or update the application where the form is used.

OnCreate is triggered from the DoCreate method (when assigned) before signalling any form handlers using the fhtCreate form handler action type. At this point, the initial coordinates for the form have been assigned, but are not realized until until DoCreate has been completed.

An application must implement and assign an object procedure using the signature for the handler to allow responding to the notification.

## See also

TCustomForm.DoCreate |  | Notifies the create handlers for the form instance.
TFormHandlerType |  | TForm Notification handler types.
TNotifyEvent