1、子窗口定义委托事件

public delegate void Btn_Click(int i);
public event Btn_Click BtnEvent;

在子窗口使用 BtnEvent(int i)方法传递给父窗口。

2、父窗口添加事件

Viewer.BtnEvent += new Btn_Click(function);

public void function(int i){

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2019-01-02
  • 2022-12-23
猜你喜欢
  • 2021-07-23
  • 2021-06-29
  • 2018-08-30
  • 2022-12-23
  • 2021-06-01
相关资源
相似解决方案