Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Anwendung starten und warten bis diese beendet ist
28. Dez 2004, 00:54
Delphi-Quellcode:
function RunAppAndWait(const AFileName: string): Boolean;
var
NewProcess: Process;
begin
NewProcess := Process.Create;
with NewProcess do
begin
StartInfo.FileName := AFileName;
try
Result := Start;
while (not HasExited) do
begin
WaitForExit(125);
Application.DoEvents;
end;
except
Result := False;
end; {end try/except}
end; {end with}
end; {end function}
[edit=Chakotay1308]Titel angepasst. Mfg, Chakotay1308[/edit]
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|