限制在MDI应用程序中调整子窗口尺寸的大小 [英] Restricting resizing the dimensions of a Child Window in an MDI application

查看:73
本文介绍了限制在MDI应用程序中调整子窗口尺寸的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MDI应用程序,其子窗口停靠在大型机内.在这种情况下,当我通过拖动子窗口的边缘超过另一边的边缘来调整其宽度时,该窗口将消失并且无法向后扩展.
有没有一种方法可以防止这种情况,例如通过设置一些最小宽度限制窗口的大小来限制用户.

希望这很清楚,并且可能会有一些标准设置.如果需要,请附上代码片段.

解决方案

为Resize事件添加事件处理程序,并在该处理程序中进行必要的检查,以将大小保持在所需的最小/最大.

I have an MDI application with child windows docked inside the mainframe. In this when i resize the width of any child window by dragging its edge past the opposite edge, the window disappears and cannot be expanded back.
Is there a way to prevent this like restricting the user by setting some minimum width below which the window cannot be resized.

Hope this is clear and there might be some standard setting. If required would attach the code snippet.

Thanks

解决方案

Ad an event handler for the Resize event, and in that handler, do the checks necessary to keep the size to your desired minimum/maximum.


这篇关于限制在MDI应用程序中调整子窗口尺寸的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆