If the ModalResult
of a Button is not equal to mrNone
and
If a form with ShowModal is opened,
Form2.ShowModal;
Button1 on Form2
after the program code is executed in the event Button1Click(...)
.
procedure TForm2.Button1Click(Sender: TObject);
begin
OpenDialog1.Execute;
end;
When the OpenDialog1
is closed, Form2
is terminated immediately.
It does not matter whether to end OpenDialog1
with ok
or cancel
.