title: Get window state of another process
body: <p>How do I get the window state(<code>maximized</code>, <code>minimized</code>) of another process that's running?</p>
  
  <p>I'd tried by using this:</p>
  
  <pre><code>Process[] procs = Process.GetProcesses();
  
          foreach (Process proc in procs)
          {
  
              if (proc.ProcessName == "notepad")
              {
                  MessageBox.Show(proc.StartInfo.WindowStyle.ToString());
  
              }
          }
  </code></pre>
  
  <p>But if process is <code>Maximized</code> or <code>Minimized</code>,it ever returns <code>Normal</code>. </p>
  
  <p>How to fix this?</p>