1.新建父窗体,设置窗体属性:IsMdicontainer设置成true;

 

MDI设置父子窗体

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.拖入button控件,修改button中的text。

MDI设置父子窗体

 

 

3.点击button控件设置代码:

//1.窗体实例化
Form frm = new Form();
//2.设置所属父窗体
frm.MdiParent = this;

//3.显示子窗体
frm.Show();
//4.设置子窗体标题
frm.Text = "子窗体";

MDI设置父子窗体

 

 4.例题完成,最后效果如下:

MDI设置父子窗体

 

 

2020-03-08 这是我写C#例题的第一天。

相关文章:

  • 2021-09-29
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2021-06-28
  • 2021-12-18
猜你喜欢
  • 2022-01-07
  • 2022-01-09
  • 2021-08-04
  • 2022-12-23
  • 2021-09-23
  • 2021-12-10
  • 2021-10-21
相关资源
相似解决方案