From2(弹出框)回传数据到From1 

Form1(数据接收form):

public string Sstr;

private void button1_Click(object sender, EventArgs e)

{

Form2 form= new Form2();

form.ShowDialog();

if (form.DialogResult == DialogResult.OK)

{

Sstr = form.Cstr;

}

}

Form2(回传数据的form):

public string Cstr;

private void button1_Click(object sender, EventArgs e)

{

Cstr= label.Text;

this.DialogResult = DialogResult.OK;

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-10-15
  • 2021-12-21
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案