//第二个窗体
public delegate void DAddress(string address);
public event DAddress ESignAddress;
protected void SignAddress(string address)
{
ESignAddress(address);
}
private void BtnClick(object sender,Eventargs e)
{
SignAddress(comCity.Text + comArea.Text + txtAddress.Text);
}
//第一个窗体
from f=new from();
f.ESignAddress+=new from.DAddress()
f.show();
protected void signaddress(string str)
{
Msg.Text=str;
}
原文地址:https://www.cnblogs.com/LuoEast/p/8394906.html
时间: 2024-10-14 00:38:08