L Liz May 12, 2004 #1 I need to be able to call an executable from a .NET solution when a button is pressed. How do I go about this??
I need to be able to call an executable from a .NET solution when a button is pressed. How do I go about this??
J Jon Skeet [C# MVP] May 12, 2004 #2 Liz said: I need to be able to call an executable from a .NET solution when a button is pressed. How do I go about this?? Click to expand... See http://www.pobox.com/~skeet/csharp/faq/#process.start
Liz said: I need to be able to call an executable from a .NET solution when a button is pressed. How do I go about this?? Click to expand... See http://www.pobox.com/~skeet/csharp/faq/#process.start
M Marc te Vruchte May 12, 2004 #3 Liz, You can use the Process in combination with the ProcessStartInfo class for this. Example ------ ProcessStartInfo processStartInfo = new ProcessStartInfo(); processStartInfo.FileName = @"notepad.exe"; processStartInfo.Arguments = @"c:\test.txt"; Process.Start( processStartInfo );
Liz, You can use the Process in combination with the ProcessStartInfo class for this. Example ------ ProcessStartInfo processStartInfo = new ProcessStartInfo(); processStartInfo.FileName = @"notepad.exe"; processStartInfo.Arguments = @"c:\test.txt"; Process.Start( processStartInfo );
A APG May 12, 2004 #5 Hi, You can use the Process class in System.Diagnostics namespace to do this. e.g. using System.Diagnostics; .... private void button1_Click(object sender, System.EventArgs e) { Process.Start("notepad.exe"); } HTH, APG
Hi, You can use the Process class in System.Diagnostics namespace to do this. e.g. using System.Diagnostics; .... private void button1_Click(object sender, System.EventArgs e) { Process.Start("notepad.exe"); } HTH, APG