对子窗体进行排列

Posted on 2018-12-17 19:37  努力成长静待花开  阅读(252)  评论(0编辑  收藏  举报

实现效果:

  

知识运用:

  MdiLayout枚举的LayoutMdi方法  public void LayoutMdi(MdiLayout value)

  LayoutMdi方法用于在MDI父窗体内排列多文档界面(MDI) 子窗体

  

实现代码:

        private void 水平平铺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileHorizontal);
        }

        private void 垂直平铺ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileVertical);
        }

        private void 层叠样式ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.Cascade);
        }