private void gvButton1_Click(object sender, EventArgs e)
{
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
System.Diagnostics.Process proc = new System.Diagnostics.Process();
//设置外部程序名(记事本用 notepad.exe 计算器用 calc.exe)
info.FileName = "calc.exe";
//设置外部程序的启动参数
info.Arguments = "";
//设置外部程序工作目录为c:\windows
info.WorkingDirectory = "c:/windows/";
try
{
//
//启动外部程序
//
proc = System.Diagnostics.Process.Start(info);
}
catch
{
MessageBox.Show("系统找不到指定的程序文件", "错误提示!");
return;
}
}