![]() |
Programm nicht mehrmals starten
Hi,
ich starte momentan mein programm, das nicht mehrmals ausgeführt werden soll, so:
Delphi-Quellcode:
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.
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. geht das mit delphi? :gruebel: :wiejetzt: |
Re: Programm nicht mehrmals starten
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:30 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz