title: Constantly check if a process is open
body: <p>I want to constantly check if a background process is running or not, I only have one label (to display the result)
  My code that shows whether it's running or not is:</p>
  <pre><code>Process[] plist = Process.GetProcessesByName(&quot;chrome&quot;);
          if (plist.Length &gt; 0)
          {
              label1.ForeColor = Color.Green;
              label1.Text = &quot;FOUND&quot;;
          }
          else 
          {
              label1.ForeColor = Color.Red;
              label1.Text = &quot;NOT FOUND&quot;;
          }
  </code></pre>
  <p>And when run it, it works, but when I close the process it still shows &quot;FOUND&quot;, how can I make it always check if plist.Lenght is 0 or &gt;0?
  p.s: I tried some duplicate questions etc and I didn't get it to work.</p>