private void MsgBox_FormClosing(object sender, FormClosingEventArgs e) { if (!usedConfirmBtn) { DialogResult = DialogResult.OK; DialogQueue.CloseCurrent(); } }
private void confirmBtn_Click(object sender, EventArgs e) { usedConfirmBtn = true; DialogResult = DialogResult.OK; DialogQueue.CloseCurrent(); }