Back

Show and ShowModal:

When you are using two forms, you can use Form2.Show; to make the second form visible to the user and bring the form to the front of the other form, form1.
This also enables the user to click between the two forms, form1 and form2.

You can also use:

procedure TForm1.Button1Click(Sender: TObject);
begin
    Form2.ShowModal;
end;
ShowModal will show a form as a modal form.
When the user clicks on the button, form2 is visible to the user.
But, the user cannot click on form1, this stops the users clicking on button1 and anything else
on form1.
Once you close form2 you can then use form1 again.


Back