G
Guest
I have a child form frmDataEntry call up another child form frmDealerSearch.
If the user clicks on cancel on frmDealerSearch, I want to close
frmDealerSearch and put the focus on txtDealerNum on frmDataEntry.
Here is my code.
public class frmDataEntry : System.Windows.Forms.Form
{
private void txtDealerNum_Leave(object sender, System.EventArgs e)
{
frmDealerSearch f = new frmDealerSearch();
f.ShowDialog();
}
}
public class frmDealerSearch : System.Windows.Forms.Form
{
private void cmdCancel_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
If the user clicks on cancel on frmDealerSearch, I want to close
frmDealerSearch and put the focus on txtDealerNum on frmDataEntry.
Here is my code.
public class frmDataEntry : System.Windows.Forms.Form
{
private void txtDealerNum_Leave(object sender, System.EventArgs e)
{
frmDealerSearch f = new frmDealerSearch();
f.ShowDialog();
}
}
public class frmDealerSearch : System.Windows.Forms.Form
{
private void cmdCancel_Click(object sender, System.EventArgs e)
{
this.Close();
}
}