void Button1Click(object sender, EventArgs e) { frmSearchPatient frmTmp = new frmSearchPatient(); frmTmp.setConnectionRefNLoadData(ref this.refConn); frmTmp.setRefFrom(this); frmTmp.DisableControl(); frmTmp.ShowDialog(); frmTmp = null; }