forms
forms(formNumber: Integer): Form;
The forms method of the Application class enables logic to access running forms in the application. This method returns a reference to the form at the number specified in the formNumber parameter, or null if the form number is invalid. This method returns an object of type
To access a specific form control, you must convert the object to a form of the appropriate type, as shown in the following example that examines all active forms for the application and accesses the text1 control of the menu form.
vars
form : Form;
indx : Integer;
begin
foreach indx in 1 to app.formsCount do
form := app.forms(indx);
if form.name = "Menu" then
form.Menu.text1.text := "The text for text box text1";
endif;
endforeach;
end;
You should not write logic like that shown in this example to cycle through forms in the range 1 through the value of
