title: Creating a new form with the same z-order as another form
body: <p>Windows Forms, .net 2.0</p>
  
  <p>My main application thread has a form (A).  I have a background thread which operates off a timer to determine that an activity has taken place - when it does, it causes the main application form to hide (using BeginInvoke), and creates a new form (B) in its own thread (seperate message pump).</p>
  
  <p>The two threads thing sounds complicated, but it is needed unfortunately.</p>
  
  <p>The new form, on the new message pump is shown at the top of the non-topmost forms (as you would expect!).  However, if the original application wasn't on top of the desktop this is very annoying.</p>
  
  <p>So, I would like to determine what the z-order of the original form (A) is before hiding it; then create my new form (B) mirroring the z-order of the original form.</p>
  
  <p>Any ideas?</p>
  
  <p>[This also has the side effect of form B popping up over a screen-saver if it is on the current users desktop (ie non passworded), which if I can't fix it how I would like above, I would like to avoid this...]</p>