[英]How to get the Form.DesktopBounds from before the window was minimized or maximized
I would like to save and restore the state of a WinForms Form , more specifically the DesktopBounds and the WindowState . 我想保存并恢复WinForms 表单的状态 ,更具体地说是DesktopBounds和WindowState 。
However, when the WindowState is not normal (ie minimized or maximized) then I would like to save the previous value of DesktopBounds, when the Form was still in a normal state. 但是,当WindowState不正常(即最小化或最大化)时,我希望在Form仍处于正常状态时保存DesktopBounds的先前值。
Obviously, windows remembers this previous state somewhere, because clicking the maximize button twice restores the original position and size of the form. 显然,Windows会在某处记住此前的状态,因为单击最大化按钮两次会恢复表单的原始位置和大小。 How do I read this original state? 我如何阅读这个原始状态?
EDIT : Some similar SO questions: 编辑 :一些类似的SO问题:
检查RestoreBounds属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.