I have two programms. “Programm1” & “Programm2”. “Programm2” is run from “Рrogramm1”. I run “Programm2” with this code:
Process.Run("D://Programms//calc.exe");
Is it possible to run “Рrogramm2” so that “Рrogramm1” can still be used but can not be closed while “Рrogramm2” works.
Can I do this with Process.Run()?
You can tell whether a process started using the
Processclass has exited by checking theYourProcess.HasExitedproperty, possibly in the form’sUnloadingevent.If you want to block and wait for a process to exit, you can use the
YourProcess.WaitForExit()method.You can find an example of this and more information in MS KB305369.