title: get main window
body: <p>I am trying to get the main Window of an application written C#.
  Application.MainWindow Property does not work :(</p>
  
  <p>uses: </p>
  
  <pre><code>using System;
  using System.Windows;
  
  using System.Windows.Forms;
  using System.ComponentModel;
  using System.Drawing;
  using System.Collections.Generic;
  
  using My;
  using MyDialogs;
  
  using System.Xml.Serialization;
  using System.Runtime.InteropServices;
  
  using System.Windows.Input;
  using System.Windows.Media;
  using System.Threading;
  using System.Windows.Interop;
  </code></pre>