uses
Forms,
windows,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
var
hdle : THandle;
begin
hdle := FindWindow(nil,'Form1');
if hdle > 0 then
begin
if IsIconic(hdle) = false then
ShowWindow(hdle,SW_RESTORE);
SetForeGroundWindow(hdle);
end
else
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;
end.