title: How to get the z-order in windows?
body: <p>I'm making an application where I interact with each running application. Right now, I need a way of getting the window's z-order. For instance, if Firefox and notepad are running, I need to know which one is in front.</p>
  
  <p>Any ideas? Besides doing this for each application's main window I also need to do it for its child and sister windows (windows belonging to the same process).</p>