title: Detecting if another instance of the application is already running
body: <p>My application needs to behave slightly differently when it loads if there is already an instance running.</p>
  
  <p>I understand how to use a mutex to prevent additional instances loading, but that doesn't quite solve my problem.</p>
  
  <p>For example:</p>
  
  <ul>
  <li>Instance 1 loads, gets the mutex.</li>
  <li>Instance 2 loads, can't get the mutex, knows there's another instance.  So far, so good.</li>
  <li>Instance 1 closes, releases the mutex.</li>
  <li>Instance 3 loads, gets the mutex, doesn't know that Instance 2 is still running.</li>
  </ul>
  
  <p>Any ideas?  Thankfully it doesn't need to deal with multiple user accounts or anything like that.</p>
  
  <p>(C#, desktop application)</p>
  
  <p>Edit: To clarify, the application doesn't need to be restricted to a single instance, just perform a slightly different start-up action if there's another instance already running.  Multiple instances are fine (and expected).</p>