Launch a process with topmost and know when it is closed c#

  • Thread starter Thread starter Attasc
  • Start date Start date
A

Attasc

I have a window form with the property topmost =true.
Now I launch the process to view a pdf file with Process.Start(...),
set myform 's topmost to false and use SetWindowPos to bringtoFront
the window launched by process.

At this point all ok.

but....
Now How to know when the window is closed....??? because I want to
reset the topmost of myform to true;

C# C#


thanks
 
Attasc said:
I have a window form with the property topmost =true.
Now I launch the process to view a pdf file with Process.Start(...),
set myform 's topmost to false and use SetWindowPos to bringtoFront
the window launched by process.

At this point all ok.

but....
Now How to know when the window is closed....??? because I want to
reset the topmost of myform to true;

C# C#


thanks

Set the process' EnableRaisingEvents to true, and handle the Exited event.
 
Back
Top