Software Programs and Projects

This Software Programs and Projects include programing tips and technology using different languages like VC++,ASP,JSP C#.Net,PHP,VB.Net,JavaScript,ASP.NET .Software Programs and Projects blog mainly support to software programmers and provide help through the mail.

// Executing external applications in C#.Net (using process)
/*

Before we begin creating any methods, we must include System.Diagnostics namespace(using System.Diagnostics), witch contains the Process class.
Also, we must declare a private variable of type Process in our class.
Let's name the variable p.

*/


/// Start Your Process

private void btnStart_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = txtProcessName.Text.Trim();
p.Start();
}

/// Browse your Executable Programs

private void btnBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog dlgOpenFileDialog = new OpenFileDialog();
if (dlgOpenFileDialog.ShowDialog() == DialogResult.OK)
{
txtProcessName.Text = dlgOpenFileDialog.FileName;
}
}
//In this case you can type any executable commands into the textbox (cmd,notepad,mspaint ..etc) or browse