Xiwen
Xiwen

Reputation: 263

c# winform how to start a process on top of main form

I have tried process.start("cmd.exe","/c"+filename), but the command line window didn't terminate itself.

Is there anyone know how to start a new process on top of main form?

Thanks

Upvotes: 0

Views: 1973

Answers (1)

Jon Seigel
Jon Seigel

Reputation: 12401

Using Process.Start is the correct solution to call an external application. The new process should even gain the input focus.

Process.Start(new ProcessStartInfo("notepad.exe"));

Upvotes: 2

Related Questions