主窗体->从窗体
下面根据上图中的步骤进行一步一步地介绍
//【1】创建委托原型
//一定要记住委托创建在类的外部
public delegate void SenderMsgDelegate(string counter);
//【2】根据原型委托创建具体的方法
public void Reciver(string counter)
{
this.lblCount.Text = counter;
}
//【3】创建委托变量
public SenderMsgDelegate senderMsgDelegate;
//【4】根据委托和具体的方法进行关联
FrmOtherOne frmOtherOne = new FrmOtherOne();
FrmOtherTwo frmOtherTwo = new FrmOtherTwo();
FrmOtherThree frmOtherThree = new FrmOtherThree();
//关联接受者的具体方法