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

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
 
F

Family Tree Mike

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top