Autor Beitrag
chrisx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mo 27.12.04 12:45 
hi, ich will, dass mein programm nach 7 minuten ein anderes programm startet.
ich weis, dass sowas mit der Timer komponente machbar ist.
aber mehr weis ich auch net, daher wäre ich dakbar, wenn jemand einen fertigen code hat, da ich mich mit dem timer net auskenne. (ich versteh das net so ganz)


danke im voraus.
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mo 27.12.04 13:06 
das intervall des timers auf 1000*60*7 einstellen (7min in millisekunden)
und im obtimerereignis per Suche in: Delphi-Library SHELLEXECUTE das andere programm öffnen und ggf. enabled des Timers auf false setzen ;)
chrisx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mo 27.12.04 13:18 
ich bin nun so weit:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormTimer(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open''C:\programm\Project1.exe'nilnil, SW_SHOW);
end;


und habe auch die eigenschaft "interval" des timers eingestellt.

aber das programm ruft das andere programm nicht auf.
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.12.04 13:28 
Starten tut dein primäres Prog aber, also ShellAPI haste eingebunden, richtig?
chrisx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Mo 27.12.04 13:33 
Elite hat folgendes geschrieben:
Starten tut dein primäres Prog aber, also ShellAPI haste eingebunden, richtig?


aha, ShellAPI hat gefehlt.


aber nun nochwas:

wie kann ich erreichen, dass das programm, nur gestartet wird, wenn es noch nicht läuft?