Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Programm nicht mehrmals starten (https://www.delphipraxis.net/14498-programm-nicht-mehrmals-starten.html)

silentAMD 10. Jan 2004 15:13


Programm nicht mehrmals starten
 
Hi,
ich starte momentan mein programm, das nicht mehrmals ausgeführt werden soll, so:
Delphi-Quellcode:
begin
Application.Handle:= CreateMutex(nil,True,PChar(a+':'+b));
if not(GetLastError = ERROR_ALREADY_EXISTS) then begin
try
 Bitte:=TBitte.Create(nil);
 Bitte.Show;
 Bitte.Refresh;
 Application.Initialize;
 Application.CreateForm(TFenster, Fenster);
finally
 Bitte.InitializationDone := True;
end;
Application.Run;
end
else Application.MessageBox('Die Anwendung wird bereits ausgeführt.',PChar(a),64);
end.
Anstatt der meldung (und dass das mehrmals geöffnete programm speicher braucht), soll das bereits geöffnete programm maximiert bzw. in den vordergrund gestellt werden.
geht das mit delphi? :gruebel:

:wiejetzt:

Luckie 10. Jan 2004 15:15

Re: Programm nicht mehrmals starten
 
Zitat:

Zitat von silentAMD
geht das mit delphi? :gruebel:

Ja. -> Forensuche.


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz