System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
//myProcess.StartInfo.FileName = "Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data Source=" + Application.StartupPath + "\\骑士游戏.exe";
myProcess.StartInfo.FileName = @"E:\11c#练习\汉语字典\骑士游戏\骑士游戏\bin\Debug ";
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.RedirectStandardInput = true;
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.RedirectStandardError = true;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
myProcess.Start();
this.txtXianshiyouxi.Text = myProcess.StandardOutput.ReadToEnd();
myProcess.WaitForExit();
myProcess.Close();
转载于:https://blog.51cto.com/12952945/1929281