Skip to content

Instantly share code, notes, and snippets.

@davecra
Created May 1, 2020 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davecra/f34c6b00b1e753634d23f1e2a8ffae1f to your computer and use it in GitHub Desktop.
Save davecra/f34c6b00b1e753634d23f1e2a8ffae1f to your computer and use it in GitHub Desktop.
Proper usage of the Asynchronous MessageBox
AsyncMessageBox.MessageBoxClosed += (o, e) =>
{
// handle the user response here
if(e.Result == DialogResult.Retry)
{
// retry code here
}
};
AsyncMessageBox.Show("There was an issue accessing 'quaterly report.xlsx'.",
"Quarterly Report Generator",
MessageBoxButtons.AbortRetryIgnore,
MessageBoxIcon.Exclamation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment