实现效果:

  设置窗体为父窗体

知识运用:

  1,IsMdiContainer属性 //该值指示窗体是否为多文档界面(MDI)子窗体的容器

  2,MdiParent属性  //获取或设置此窗体的多文档界面文档(MDI)父窗体  属性值Form类型

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            Form2 fm2 = new Form2();
            fm2.MdiParent = this;
            fm2.Show();
        }

 

相关文章:

  • 2021-10-21
  • 2021-12-15
  • 2021-07-26
  • 2022-12-23
  • 2021-11-28
  • 2021-05-24
  • 2021-05-21
  • 2022-02-28
猜你喜欢
  • 2021-07-26
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案