Exemple #1
0
        private void 记事本ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Mdi4记事本 mf4 = new Mdi4记事本();

            mf4.MdiParent = this;
            mf4.Show();
        }
Exemple #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //注意:设置属性
            //必须:MainForm 窗口属性中 Icon 中 IsMdiContainer 设置为 True

            //设置当前窗体为 MdiForm 的父窗体
            Mdi1串口  mf1 = new Mdi1串口();
            Mdi2网口  mf2 = new Mdi2网口();
            Mdi3USB mf3 = new Mdi3USB();
            Mdi4记事本 mf4 = new Mdi4记事本();

            mf1.MdiParent = this;
            mf2.MdiParent = this;
            mf3.MdiParent = this;
            mf4.MdiParent = this;
            mf1.Show();
            mf2.Show();
            mf3.Show();
            mf4.Show();

            LayoutMdi(MdiLayout.TileVertical);//纵向排序
        }