Process[] process = Process.GetProcesses();
Console.WriteLine("System Running Process \n\n");
foreach (Process Proc in process)
{
if (!string.IsNullOrEmpty(Proc.MainWindowTitle))
{
IntPtr wHnd = Proc.MainWindowHandle;
Console.WriteLine("Process Name {0} : status {1}", Proc.ProcessName, !IsIconic(wHnd));
//ShowWindowAsync(wHnd, SW_RESTORE);
//SetForegroundWindow(wHnd);
Console.WriteLine("--------------------");
// Console.WriteLine(Proc.ProcessName);
}
}
代碼紅色標記的應用程序的輸出也不會使用,但在研究背景進程中運行,並顯示
代碼這實際上是我想要的輸出
檢查[this](http://stackoverflow.com/questions/35813376/how-do-i-check-if-a-running-process-is-a-background-process)。 – Berkay