From RAD Studio API Documentation
Jump to: navigation, search


property Forms[Index: Integer]: TForm read GetForm;


__property TForm* Forms[int Index] = {read=GetForm};


Type Visibility Source Unit Parent
property public
Vcl.Forms TScreen


Lists all the forms currently displayed in the application.

Use Forms to access a form by index. The value of Index is a number between zero (the first form) and FormCount - 1. Forms can be used with FormCount when an application needs to iterate over all its forms, including all dialogs.

Forms only lists the TForm descendants in the application. This does not include, for example, property pages. To get a list that includes TCustomForm descendants that do not descend from TForm, use CustomForms instead.

Warning: The order in which Forms lists its forms is affected by the Z order of the forms. Do not change the Z order of forms when using Forms to iterate over the forms in an application.

See Also

Code Examples