Wait for external application to complite and than continue??
-
Hi, In my application I have to call an external application (System.Diagnostics.Process.Start("C:\\NeckingRa\\Fortran\\necking_contour.exe"), (command window) , which creates one FILE that I need for my calculation, and thats why I need to pause my app untill external app is done (terminated).. Please, can somebody help me?? How can I do it?? Thanks
-
Hi, In my application I have to call an external application (System.Diagnostics.Process.Start("C:\\NeckingRa\\Fortran\\necking_contour.exe"), (command window) , which creates one FILE that I need for my calculation, and thats why I need to pause my app untill external app is done (terminated).. Please, can somebody help me?? How can I do it?? Thanks
Process.EnableRaisingEvents = true;
Process.Exited += new EventHandler(somemethod);top secret
Download xacc-ide 0.0.3 now!
See some screenshots -
Hi, In my application I have to call an external application (System.Diagnostics.Process.Start("C:\\NeckingRa\\Fortran\\necking_contour.exe"), (command window) , which creates one FILE that I need for my calculation, and thats why I need to pause my app untill external app is done (terminated).. Please, can somebody help me?? How can I do it?? Thanks
-
It's a property of the
Process
class. You get an instance ofProcess
fromSystem.Diagnostics.Process.Start()
... mav -
It's a property of the
Process
class. You get an instance ofProcess
fromSystem.Diagnostics.Process.Start()
... mavFirs thankYou for help.. But I am not wery god in it.. I have to make a little application and call extern .exe file, wait untill its done and go on.. this extern .exe file creates a file i need in my calculation.. i have a button, and when I click on it: private void button3_Click(object sender, System.EventArgs e) { System.Diagnostics.Process.Start"C:\\NeckingRa\\Fortran\\necking_contour.exe"); ********* Hier I have to wait until this .exe app creates output.dat*************** ********* how would U do it? Can U please write it for me, (I am beginer :)******** System.IO.File.Exists("C:\\NeckingRa\\Temp\\output.dat"); System.IO.File.Copy("C:\\NeckingRa\\Temp\\output.dat",DSave.FileName,true); }
-
Firs thankYou for help.. But I am not wery god in it.. I have to make a little application and call extern .exe file, wait untill its done and go on.. this extern .exe file creates a file i need in my calculation.. i have a button, and when I click on it: private void button3_Click(object sender, System.EventArgs e) { System.Diagnostics.Process.Start"C:\\NeckingRa\\Fortran\\necking_contour.exe"); ********* Hier I have to wait until this .exe app creates output.dat*************** ********* how would U do it? Can U please write it for me, (I am beginer :)******** System.IO.File.Exists("C:\\NeckingRa\\Temp\\output.dat"); System.IO.File.Copy("C:\\NeckingRa\\Temp\\output.dat",DSave.FileName,true); }
// Makes things easier
using System.IO;
using System.Diagnostics;private void button3_Click(object sender, System.EventArgs e)
{
Process p = Process.Start("C:\\NeckingRa\\Fortran\\necking_contour.exe");
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(ProcessExited);
}private void ProcessExited(object sender, EventArgs e)
{
if (System.IO.File.Exists("C:\\NeckingRa\\Temp\\output.dat"))
System.IO.File.Copy("C:\\NeckingRa\\Temp\\output.dat",DSave.FileName,true);}
The bill is in the mail ;) mav
-
// Makes things easier
using System.IO;
using System.Diagnostics;private void button3_Click(object sender, System.EventArgs e)
{
Process p = Process.Start("C:\\NeckingRa\\Fortran\\necking_contour.exe");
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(ProcessExited);
}private void ProcessExited(object sender, EventArgs e)
{
if (System.IO.File.Exists("C:\\NeckingRa\\Temp\\output.dat"))
System.IO.File.Copy("C:\\NeckingRa\\Temp\\output.dat",DSave.FileName,true);}
The bill is in the mail ;) mav