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

# TScreen.NewFormWasCreated

Notifies handler(s) when a new form is created for the TScreen instance.

## Declaration

Source position: forms.pp line 1222

`public procedure TScreen.NewFormWasCreated(`
`AForm: TCustomForm`
`);`

## Arguments

`AForm` |  | Form instance that was created on the screen.

## Description

NewFormWasCreated is method which notifies form handlers for the TScreen instance when a new form instance is created. It calls the NotifyScreenFormHandler method using the handler type for the notification and the TCustomForm instance in AForm as arguments. The screen form event is signalled for all registered handlers which use the snNewFormCreated screen notification type.

NewFormWasCreated is called at design-time from the source file manager in the Lazarus IDE. It is called immediately after a new form or datamodule type is created and added to the active project in the IDE. NewFormWasCreated is not called at run-time in the LCL, and has no relationship to when an instance of a form type is created in an application.

## Version info

Added in LCL version 3.0.

## See also

TScreen.NewFormWasCreated |  | Notifies handler(s) when a new form is created for the TScreen instance.
TScreenNotification |  | Screen notification events and handler types.
TCustomForm |  | The base type for TForm classes.