更新时间: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.