父子窗体 - 子窗体在最大化和还原时缩小
我有一个 winform 并使用 IsMdiContainer 属性在其中打开其他表单。在父级的构造函数中,我得到:
this.IsMdiContainer = true;
this.WindowState = FormWindowState.Maximized;
然后对于子级,我得到:
child.MdiParent = this;
child.WindowState = FormWindowState.Maximized;
出于某种原因,如果最大化并恢复(而不是最小化)子窗体每次都会缩小。现在,在子窗体中,我有一个 dock.fill 面板和两个组框,其中一个停靠在顶部,另一个停靠以填充。
任何想法为什么会发生这种行为?
谢谢
I have a winform and opening other forms inside this using IsMdiContainer property. In contructor of parent I got :
this.IsMdiContainer = true;
this.WindowState = FormWindowState.Maximized;
then for child I got :
child.MdiParent = this;
child.WindowState = FormWindowState.Maximized;
for some reason if you maximize and restore down(not minimize) the child form shrinks each time. Now in child form I have a dock.fill panel and two groupboxes one docked to top and other dock to fill.
any ideas why this behaviour is happening?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不应该发生。检查您的子表单的代码,看看是否可以找到任何其他尺寸设置。
This shouldn't happen. Check the code for your child form and see if you can find any additional size settings.