uses Forms, Unit1 in 'Unit1.pas' {Form1} ,Windows, Messages;
const hfck=wm_user+$1000; appname='myname'; var myhandle:hwnd; {$R *.res}
begin myhandle:=findwindow(appname,nil); if myhandle>0 then begin postmessage(myhandle,hfck,0,0); exit; end; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end.