One of my user reported a strange issue for a C# Windows Forms MDI application.
When the application closes, I save the WindowState, and the Bouds or RestoreBounds when the form is either Maximized or Minimized.
When the application restarts, I rehydrate the forms exactly like they were when the application closed.
My issue is that if a form is Minimized, I set its bound and then set the WindowState to Minimized. It is working great until there. But when the user tries to restore to the previous size, the window is correctly set to the previous top/left but width and height are not following correctly.
The strange thing is that the behavior works properly with the Maximized state!
Any ideas on how to ensure a from can be restored correctly?
Here is some code from my OnLoad override (Bounds are properly persisted):