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

TScreen.FormIndex

Gets the ordinal position in Forms for the requested form.

Declaration

Source position: forms.pp line 1220

public function TScreen.FormIndex(

  AForm: TForm

):Integer;

Arguments

AForm

  

The TForm instance to locate in Forms.

Function result

Ordinal position in Forms for the TForm instance, or -1 when not found.

Description

FormIndex is an Integer function used to get the position in Forms where the specified TForm instance in located. It iterates over the values in Forms in reverse order. The return value contains the ordinal position in Forms where the TForm instance in AForm was found, or -1 when AForm does not exist in Forms.

Use the CustomFormIndex method to locate a form instance derived from TCustomForm in the CustomForms property.


Version 3.2 Generated 2024-02-25 Home