【发布时间】:2017-03-08 08:33:28
【问题描述】:
这是代码
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);
}
}
Red Mark 应用程序未使用但在后台进程中运行并显示的代码输出
这实际上是我想要的输出
【问题讨论】:
-
检查this。