procedure TForm1.Button1Click(Sender: TObject); begin with TForm2.Create(self) do try ShowModal; finally Free; end; end;