J
Jeff Connelly
C#. If I minimize a window programmatically (form.WindowState =
System.Windows.Forms.FormWindowState.Minimized), and then restore it
programmitically (FormWindowState.Normal) I can see in the debugger that the
form.Size changes both times. So where is that size saved away?
What I need to do is persist the state of forms between executions of the
application. So I save the form size and state. I The problem is, if the
state is minimized, then the size will always be "0" (the size of a
minimized form). If I recreate the form when I start the app again, it
starts minimized. If I then restore the (manually, not programmatically),
it no longer knows what size to go back to. It stays the same size as the
minimized size, but the buttons just change (you can no longer restore - it
is already restored to that mini-size). You can resize the form manually at
this point.
System.Windows.Forms.FormWindowState.Minimized), and then restore it
programmitically (FormWindowState.Normal) I can see in the debugger that the
form.Size changes both times. So where is that size saved away?
What I need to do is persist the state of forms between executions of the
application. So I save the form size and state. I The problem is, if the
state is minimized, then the size will always be "0" (the size of a
minimized form). If I recreate the form when I start the app again, it
starts minimized. If I then restore the (manually, not programmatically),
it no longer knows what size to go back to. It stays the same size as the
minimized size, but the buttons just change (you can no longer restore - it
is already restored to that mini-size). You can resize the form manually at
this point.