看板 C_Sharp 關於我們 聯絡資訊
我都是這樣用的 Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.CreateNoWindow = true; p.StartInfo.FileName = "regedit.exe"; p.StartInfo.Arguments = "/s xd.reg"; p.Start(); p.WaitForExit(); ※ 引述《herman602 (奸商)》之銘言: : 通常呼叫外部執行檔之後 : 就會有視窗跑出來 : 但是我想要做到我呼叫外部執行檔之後 : 那個外部執行檔的console視窗不要跑出來 : 並且由主程式同時取得該外部程序PID : 發現外部PID不見了就代表外部程序執行完畢 : 再繼續主程式 : 請問有辦法隱藏外部程序的console視窗嗎? -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.216.4.5
herman602:成功了!!!感謝!!! 04/07 23:44