C#如何确定Process是否为后台进程

时间:2018-09-22 22:18:41

标签: c# process

如何确定具有GetProcess(Name)的一个进程是否是后台进程?

1 个答案:

答案 0 :(得分:2)

对于function wpse_ad_content_two($content) { if (!is_single()) return $content; $paragraphAfter = 4; //Enter number of paragraphs to display ad after. $content = explode("<h2>", $content); $new_content = ''; for ($i = 0; $i < count($content); $i++) { if ($i == $paragraphAfter) { $new_content.= '[irp]'; } $new_content.= "<h2>" . $content[$i]; } return $new_content; } 类,您可以检查Process属性。如果进程没有窗口,它将为MainWindowHandle