Sign in Join
FPDoc Onlineexperiment

TScreen.FindForm function

Member of TScreenpublicIn unit Forms

Finds a form on the screen by its name.

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.