title: Check if currently minimized window was in maximized or normal state at the time of minimization
body: <p>How can I distinguish whether a currently minimized window was maximized before that, as opposed to normal state in C#/WinForms? </p>
  
  <pre><code>if (WindowState == FormWindowState.Minimized)
  {
      Properties.Settings.Default.Location = RestoreBounds.Location;
      Properties.Settings.Default.Size = RestoreBounds.Size;
      Properties.Settings.Default.IsMaximized = ...; // How do I know if the window would be restored to maximized?
  }
  </code></pre>
  
  <p>I want to make the position and state of my window persistent using the application settings and I'm following <a href="https://stackoverflow.com/a/1876326/492336">https://stackoverflow.com/a/1876326/492336</a> but if the window was minimized at the time of closing I don't want it to start minimized on the next application start (which is what the answer there currently does).</p>
  
  <p>What I want is for the window to start maximized if it had been maximized at the time it was minimized, and to start in its normal state if it had been in normal state at the time it was minimized.</p>