refer this example
Child Form
public partial class FormChildEmployee : Form
{
public frm_employees ParentFormObject { get; set; }
public FormChildEmployee()
{
InitializeComponent();
}
private void btnSelect_Click(object sender, EventArgs e)
{
ParentFormObject.txt_empid.Text = txt_emp_code.Text;
}
}
in Parent Form
private void btnOpenPopUpChild_Click(object sender, EventArgs e)
{
FormChildEmployee objChild = new FormChildEmployee();
objChild.ParentFormObject = this;
objChild.Show();
}
Note: make the Parent Form textbox (
txt_empid) as
Public
modifier in the design view.