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

# TScreen.Forms

Provides indexed access to TForm instances on the screen.

## Declaration

Source position: forms.pp line 1291

`public property TScreen.Forms[Index: Integer] : TForm read GetForms;`

## Description

Forms is a read-only indexed TForm property which provides access to the TForm instances on the screen by their ordinal position in the list of forms. Index values must be in the range 0..FormCount-1. An EListError exception is raised when Index contains an invalid position for the list.

Values are added to and removed from Forms in the AddForm and RemoveForm methods. These methods are called when the CreateNew or Destroy method in TForm is executed. Forms is used in widgetset classes to get the form instance with a given Handle in the widgetset.

Use CustomForms and CustomFormCount to access the TCustomForm instances on the screen.

## Errors

Raises an EListError exception when Index contains an invalid position for the list.

## See also

TScreen.FormCount |  | The number of Forms on the screen.
TScreen.CustomForms |  | Provides indexed access to the TCustomForm instances on the screen.
TScreen.CustomFormCount |  | Number of TCustomForm form instances in the CustomForms property.
TCustomForm.CreateNew |  | Creates a form instance without a resource (.lfm) file.
TCustomForm.Destroy |  | Destructor for the class instance.