我有一個程序,啓動另一個程序(iexplore.exe),然後我的程序應該「隱形」或atlast到背景,並保持這個asd。 exe正在運行。此代碼正在工作,但它吃內存,有時它只是保持隱藏,而asd.exe不再運行。必須有這樣做更有效的方式=) 所以我的程序代碼:如何發送我的程序到背景,而某個過程正在運行
this.Hide();
Process.Start(Path.Combine(Path, "iexplore.exe"));
Process[] Running_ = null;
do
{ // this loops eats memory!
System.Threading.Thread.Sleep(500);
Running_ = null;
Running_ = Process.GetProcessesByName("iexplore");
}while (Running_.Length > 0);
this.Show();
像魅力一樣工作,非常感謝你的先生! :P –
從未使用過Exited事件。絕對好,如果它的廣告作品! –