Попробуй вот такое решение:
Код:
var
Form1: TForm1;
PreviousInstanceWindow: THandle;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
if WaitForSingleObject(PreviousInstanceWindow, 0) <> 0
then begin
ShowWindow(PreviousInstanceWindow, SW_RESTORE);
Application.Terminate;
end
else SetForegroundWindow(PreviousInstanceWindow);
end;
initialization
PreviousInstanceWindow := CreateMutex(nil, True, 'DJ PhoeniX');
finalization
CloseHandle(PreviousInstanceWindow);
end.