private void txtPartnumber_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmPartnumberLookup partnumberlookup = new frmPartnumberLookup(); partnumberlookup.LookUpPartnumber(txtPartnumber.Text); partnumberlookup.ShowDialog(); if (partnumberlookup.Open_File) { m_filetoOpen = partnumberlookup.GetFileToOpen(); m_open_file = true; this.DialogResult = DialogResult.Abort; this.Close(); } else if (partnumberlookup.Compare_File) { m_filetoOpen = partnumberlookup.GetFileToOpen(); m_compare_file = true; this.DialogResult = DialogResult.Abort; this.Close(); } }