110,565
社区成员
发帖
与我相关
我的任务
分享
// A弹出B的时候,将A对象带到B
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
frmB fm= new frmB(this);
fm.ShowDialog();
}
// B类
public partial class Form2 : Form
{
private Form m_F = null;
public Form2(Form F1)
{
InitializeComponent();
// 接受A对象
this.m_F = F1;
}
// 恢复A
private void button1_Click(object sender, EventArgs e)
{
//关闭自己
this.Close();
if (this.m_F != null)
{
//恢复A
this.m_F.Visible = true;
}
}
}