最小化所有后表单不会恢复到以前的大小
该表单设置为没有最大化按钮。当按下 Win+D 时,所有窗口最小化,包括窗体。单击应用程序的任务栏条目时,会显示表单,但不会恢复到以前的大小。表单被简化为仅显示标题栏和边框,没有客户区。
我尝试监听 WM_SIZE 消息的 SIZE_RESTORED 值,但似乎无法从 RestoreBounds 或 GetWindowPlacement 获得正确的大小。
我将尝试以另一种方式进行操作,查找 SIZE_MINIMIZED 并捕获该矩形,然后当我回来时从 SIZE_RESTORED 上的该矩形恢复。
与此同时,你们中的任何人都知道为什么表单一开始就不能正确恢复,以便我可以应用适当的修复程序。或者如果无法进行正确的修复,则建议更好的方法。
The form is set up to have no maximize button. When Win+D is pressed, all windows minimize including the form. When clicking on the application's taskbar entry, the form shows up but does not restore to the previous size. The form is reduced to just showing the title bar and the borders, w/o the client area.
I tried listening for WM_SIZE message's SIZE_RESTORED value, but couldn't seem to get the right size from RestoreBounds or GetWindowPlacement.
I'll try to do it the other way and look for SIZE_MINIMIZED and capture the rect, then restore from that rect on SIZE_RESTORED, when I come back.
In the meantime, any of you have an idea why the form does not restore correctly in the first place so I can apply a proper fix. Or suggest a better approach, if the proper fix is not possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在对表单做一些奇怪的事情 - 尝试从头开始创建一个应用程序,并观察空默认表单上的行为。
然后,从那里开始 - 添加对新表单/项目的更改,并查看问题何时开始发生。
You are doing something weird with your form - try creating an application from scratch, and observe the behavior on empty default form.
Then, go from there - add changes to the new form/project and see when the problem will start to occur.