为最大化的MDI子在.NET的WinForms多个控制按钮多个、按钮、MDI、NET

2023-09-03 06:47:48 作者:消失掉旳回忆.

这就是我得到的,当我尝试自动最大化的MDI儿童。 在code是这样的:

That's what I get when I try to automatically maximize MDI children. The code is something like this:

this.IsMdiContainer = true;
child = new Form();
child.MdiParent = this;
child.WindowState = FormWindowState.Maximized;
child.Show();

任何想法,为什么我得到多个控制按钮?

Any ideas why do I get multiple control buttons ?

推荐答案

我可以部分瑞普这一点。不要叫孩子的Show()方法在构造函数中,做到这一点,在父母的Load事件处理程序。不那么肯定对平衡度欠佳的最小/最大/关闭图标。

I can repro this partially. Don't call the child's Show() method in the constructor, do it in the parent's Load event handler. Not so sure about the off-kilter min/max/close icons.