title: How to determine if an process is the currently active / foreground application
body: <p>I'd like to be able to query some function and give it a processID or processName - It then should return <code>true</code> or <code>false</code> on wether that process is in the foreground or not. </p>
  
  <p>So i.e. the query for Firefox would return <code>true</code> (because right now I'm in FireFox, typing this) and everything else should return <code>false</code>.</p>
  
  <p><br><br></p>
  
  <p>Is that even possible for every type of application (.net, java/swing, pure c++/win32-ui)?<br></p>
  
  <ul>
  <li>This question is for Windows only.</li>
  </ul>