private void btnSearch_Click(object sender, EventArgs e) { frmExport frmThis = new frmExport(); frmThis = this; this.Hide(); frmExSearch frm = new frmExSearch(ref frmThis); frm.ShowDialog(ref txtTransaction_code); FormEvents = 6; }