Restore WindowState from Minimized
Posted
by tbetts42
on Stack Overflow
See other posts from Stack Overflow
or by tbetts42
Published on 2008-12-09T22:16:11Z
Indexed on
2010/04/27
21:23 UTC
Read the original article
Hit count: 171
winforms
Is there an easy method to restore a minimized form to its previous state, either Normal or Maximized? I'm expecting the same functionality as clicking the taskbar (or right-clicking and choosing restore).
So far, I have this, but if the form was previously maximized, it still comes back as a normal window.
if (docView.WindowState == FormWindowState.Minimized)
docView.WindowState = FormWindowState.Normal;
Do I have to handle the state change in the form to remember the previous state?
© Stack Overflow or respective owner