Calling another application in C#
Include System.Diagnostics namespace.Process proc = null;ProcessStartInfo procInfo = new ProcessStartInfo("Notepad.exe");procInfo.UseShellExecute = false;proc = Process.Start(p
October 6, 2004
Include System.Diagnostics namespace.
Process proc = null;
ProcessStartInfo procInfo = new ProcessStartInfo("Notepad.exe");
procInfo.UseShellExecute = false;
proc = Process.Start(procInfo);
proc.WaitForExit();
Create objects for Process and ProcessStartInfo.
In ProcessStartInfo specify the application to run.
procInfo.UseShellExecute = false;
this line is to indicate whether to use the operating system shell to start the process.Default value is true.
procInfo.CreateNoWindow = true;
Indicates to start the process in new window.
proc = Process.Start(procInfo);
It will start the process and wait indefinitely for the process to exit.
About the Author
You May Also Like