namespace _8.MIDI窗体设计 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

    private void 显示子窗体ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        //点击显示子窗体控件时,显示出所有子窗体
        Form2 frm2 = new Form2();
        frm2.MdiParent = this;
        frm2.Show();
        Form3 frm3 = new Form3();
        frm3.MdiParent = this;
        frm3.Show();
        Form4 frm4 = new Form4();
        frm4.MdiParent = this;
        frm4.Show();
    }

    private void 横向排列ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        //对子窗体进行横向排列
        LayoutMdi(MdiLayout.TileHorizontal);
    }

    private void 纵向排列ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        //子窗体纵向排列
        LayoutMdi(MdiLayout.TileVertical);
    }
}

}