Posts Tagged exe running from c#
Running a .exe file from windows form application using C#
Posted by Bikash Karmokar in C# on August 3, 2011
Running exe file from C# windows form application is very easy.
Let You want to start bks.exe file when you click on the Luanch exe button like below:
Double click on the button. It will appear like below in the code file:
private void button1_Click(object sender, EventArgs e)
{
}
let you have exe fiel name bks.exe in the C drive. then you have to write
System.Diagnostics.Process.Start(@”C:\bks.exe”); in the button actions.
Then the total code will be look like:
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(@”C:\bks.exe”);
}
Run your program and click the Lunch button. Wow!!! you have just created a program which can start another program from your pc.
Have fun with C#.