c# - Hold the command prompt until user close it from close button -


I'm going to get a command prompt from my C # application to compile some C ++ files. Code is like that.

  Private Zero Button 1_Click (Object Sender, EventArgs e) {string filePath = @ "C: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ bin \ cl.exe"; System.Diagnostics.Process.Start (filepath); }  

But after I click on the button suddenly comes and disappears. Even the first two command prompts. I have to catch it and only one command prompt should appear. Can someone provide me the necessary code? Thank you.

The simplest way would be something like this:

  ProcessStartInfo Psi = New ProcessStartInfo {FileName = "cmd", argument = @ "/ k" "C: \ program files \ Microsoft Visual Studio 9.0 \ VC \ bin \ cl.exe" ""}; Process.Start (psi);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -