Autor Beitrag
Matthias-K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Mi 05.01.05 16:16 
hi leutz!

bei meinem progi prüfe ich beim start, ob es bereits offen ist. das funktioniert. allerdings soll das programm dann angezeigt werden. wie mache ich das, wenn sich das progi zu dem zeitpunkt im systray befindet?

ich brauche eine schnelle und schmutzige lösung! wenn jemand weis, wie es geht, postet es bitte!


mfg matthias
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Mi 05.01.05 16:36 
hi
ausblenden Delphi-Quelltext
1:
2:
  Application.Restore;
  Application.BringToFront;

nimm ma das

mfg matze

_________________
si tacuisses, philosophus mansisses.
Matthias-K Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Mi 05.01.05 16:40 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
Sem := CreateSemaphore(nil, 0, 1, 'PROGRAMMNAME');
  if ((Sem <> 0) and (GetLastError = ERROR_ALREADY_EXISTS)) then
  begin
    CloseHandle(Sem);
    Halt;
  end;



so prüfe ich, ob das programm bereits eine laufende instanz besitzt, aber wie funktioniert das mit dem bringtofront, bzw restore? wo soll man das denn einbauen, das die schon laufende instanz das mitbekommt?

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.