type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
if Form2=nil then
begin
Form2:=TForm2.Create(self);
Form2.Show;
end else Form2.SetFocus;
end;
end.
///////////////////////////
unit Unit2;