CustomForms (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code adds the name of all forms and dialogs on the screen to ListBox1 when Button1 is clicked.

Code

procedure TForm1.Button1Click(Sender: TObject);
var
  I: Integer;
begin
  for I := 0 to Screen.CustomFormCount-1 do
    ListBox1.Items.Add(Screen.CustomForms[I].Name);
end;

Uses

See Also