Name
DialogResult
Synopsis
This enumeration defines the standard user responses from a dialog. A
value from this enumeration is returned from the
Form.ShowDialog() method once the (modal) form
has been closed. You can also specify a Button
object’s DialogResult property to
determine which value is returned when that particular button is used
to close the dialog.
public enum DialogResult { None = 0, OK = 1, Cancel = 2, Abort = 3, Retry = 4, Ignore = 5, Yes = 6, No = 7 }
Hierarchy
System.Object
→ System.ValueType → System.Enum(System.IComparabl,
System.IFormattable,
System.IConvertible)
→ DialogResult
Returned By
Button.DialogResult,
CommonDialog.ShowDialog(),
System.Windows.Forms.Design.ComponentEditorForm.ShowForm(),
System.Windows.Forms.Design.IUIService.{ShowDialog(), ShowMessage()},
System.Windows.Forms.Design.IWindowsFormsEditorService.ShowDialog(), Form.{DialogResult,
ShowDialog()},
IButtonControl.DialogResult,
MessageBox.Show()
Passed To
Button.DialogResult,
Form.DialogResult,
IButtonControl.DialogResult
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access