...machen, dass eine Anwendung nur einmal pro Windows-Session gestartet werden kann?
Autor: Josha van Praag
procedure TForm1.FormShow(Sender: TObject);
var
atom: Integer;
begin
if GlobalFindAtom('a random string here') = 0 then
atom := GlobalAddAtom('a random string here')
else
begin
ShowMessage('This application will run once a windows-session' + #13 +
'Restart Your computer to use this app');
Close;
end;
end;
printed from
www.swissdelphicenter.ch
developers knowledge base