I created 2 forms (form1 and form2). In form1, press f5 function key it will display form 2. Then I want pass the value to form1 and just close the form2 when button click fire.
Form1 Code
public string fo
{
get { return txtCusID.Text; }
set { txtCusID.Text = value; }
}
Form 2 code
public partial class SearchForm : Form
{
PawningForm f2 =new PawningForm();
private void button1_Click_1(object sender, EventArgs e)
{
lblTest.Text = row.Cells[0].Value.ToString();
f2.fo = lblTest.Text;
f2.Show();
}
}
but when I click button on from2 it will create form1 twice, because "f2.Show();" and existing form1. But I want just pass value to existing form1.