public void Rescore() { using (var dlg = new RescoreResultsDlg(DocumentUIContainer)) { if (dlg.ShowDialog(this) == DialogResult.OK) { // If the RescoreResultsDlg did work then cancel out of this dialog DialogResult = DialogResult.Cancel; } } }