且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

限制在MDI应用程序中调整子窗口尺寸的大小

更新时间:2022-10-15 13:31:11

为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.