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

# TScreen.FindForm

Finds a form on the screen by its name.

## Declaration

Source position: forms.pp line 1227

`public function TScreen.FindForm(`
`const FormName: string`
`):TCustomForm;`

## Arguments

`FormName` |  | Name for the form to locate in the method.

## Function result

Form instance with the specified name, or Nil.

## Description

Visits the form instances in the CustomForms property, and compares the text in the Name properties to the value in FormName. CompareText is called to perform a case-insensitive comparison for the values.

The return value is the TCustomForm instance which matches the name in FormName, or Nil when CustomFormCount is 0 or FormName is not found in CustomForms.

## See also

TScreen.FindNonDesignerForm |  | Finds the form with the specified name, excluding designer forms.