Erik N
asked on
´"Stop" motherapp. after launching with Createprocess..
I use Createprocess to launch an external application. However, I want the "Mother-process" (the app. that I use to Launch) to execute some lines of code after the launched application is closed..
Like this:
Procedure Form1.Button1Click(Sender: TObject);
// Var declaration..
Begin
Createprocess(PChar(Proces s_To_Launc h),NIL,NIL ,NIL,False ,
Normal_Priority_Class,NIL, Startup_In fo,Process _Info);
// some lines of code that I want to be executed after the
// Process_To_Launch is closed down.
// For example:
ShowMessage('The Process is closed down');
End;
The problem is that the external application is launched,
and then the following rows of code is executed directly,
Without waiting for the launched application to finish..
Is this the way to do it, or do I have to create some event-
handling for this, in short: How do I do it?
I use Delphi Developer 2.0
Thanks!
Erik N
Like this:
Procedure Form1.Button1Click(Sender:
// Var declaration..
Begin
Createprocess(PChar(Proces
Normal_Priority_Class,NIL,
// some lines of code that I want to be executed after the
// Process_To_Launch is closed down.
// For example:
ShowMessage('The Process is closed down');
End;
The problem is that the external application is launched,
and then the following rows of code is executed directly,
Without waiting for the launched application to finish..
Is this the way to do it, or do I have to create some event-
handling for this, in short: How do I do it?
I use Delphi Developer 2.0
Thanks!
Erik N
ASKER
Edited text of question
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked just fine!
Thank you Inter-Igor!
Erik N
Thank you Inter-Igor!
Erik N
ASKER