1、C#按钮程序启动外部的EXE文件
private void BT_Others_Click(object sender, EventArgs e)
{
System.Diagnostics.ProcessStartInfo process = new ProcessStartInfo();
process.FileName = Path.Combine("", EXEAdress); //EXEAdress为exe程序所在的位置
process.UseShellExecute = false;
System.Diagnostics.Process.Start(process);
this.Hide();
this.Dispose();
}
2、运行EXE文件后连不上数据库的原因及解决方法
当前:路径一致的问题,需要把运行的C#.exe放到外部调用的exe程序同一路径下。
如图:
