实现方法如下:

1. 从Form 继承一个 Form1类.

2. 从Form 继承一个 Form2类.

3.在Form2类中加一个成员变量:frmParent

4.在Form2 类中加入一个重载的构造方法:public form2(Form1 Parent){frmParent=Parent};

5.在Form1中添加一个Button对象. 对应的事件代码为:

{

       Form2 frm=new Form2(this);
       frm.Show();
  

}

6.在Form2中添一个Button对象,对应事件代码为:

{

frmParent.Text="成败改写";

相关文章:

  • 2021-12-01
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案