MessageBox
Methods to show a standard message box with display text, buttons, and typically an icon indicating the type
Methods
Show
#public static DialogResult Show(Control parent, string text, MessageBoxButtons buttons, MessageBoxType type = MessageBoxType.Information, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Default)
Shows a message box, blocking only the window of the specified
parentParameters:
| parent (Control) | Parent control that triggered the message box |
| text (string) | Text for the body of the message box |
| buttons (MessageBoxButtons) | Buttons to show on the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
| defaultButton (MessageBoxDefaultButton = MessageBoxDefaultButton.Default) | Button to set focus to by default |
Show
#public static DialogResult Show(Control parent, string text, MessageBoxType type = MessageBoxType.Information)
Shows a message box, blocking only the window of the specified
parentParameters:
| parent (Control) | Parent control that triggered the message box |
| text (string) | Text for the body of the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
Show
#public static DialogResult Show(Control parent, string text, string caption, MessageBoxButtons buttons, MessageBoxType type = MessageBoxType.Information, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Default)
Shows a message box, blocking only the window of the specified
parentParameters:
| parent (Control) | Parent control that triggered the message box |
| text (string) | Text for the body of the message box |
| caption (string) | Caption for the title bar or heading of the message box |
| buttons (MessageBoxButtons) | Buttons to show on the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
| defaultButton (MessageBoxDefaultButton = MessageBoxDefaultButton.Default) | Button to set focus to by default |
Show
#public static DialogResult Show(Control parent, string text, string caption, MessageBoxType type = MessageBoxType.Information)
Shows a message box, blocking only the window of the specified
parentParameters:
| parent (Control) | Parent control that triggered the message box |
| text (string) | Text for the body of the message box |
| caption (string) | Caption for the title bar or heading of the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
Show
#public static DialogResult Show(string text, MessageBoxButtons buttons, MessageBoxType type = MessageBoxType.Information, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Default)
Shows a message box, blocking input to all windows of the application until closed
Parameters:
| text (string) | Text for the body of the message box |
| buttons (MessageBoxButtons) | Buttons to show on the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
| defaultButton (MessageBoxDefaultButton = MessageBoxDefaultButton.Default) | Button to set focus to by default |
Show
#Shows a message box, blocking input to all windows of the application until closed
Parameters:
| text (string) | Text for the body of the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
Show
#public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxType type = MessageBoxType.Information, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Default)
Shows a message box, blocking input to all windows of the application until closed
Parameters:
| text (string) | Text for the body of the message box |
| caption (string) | Caption for the title bar or heading of the message box |
| buttons (MessageBoxButtons) | Buttons to show on the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |
| defaultButton (MessageBoxDefaultButton = MessageBoxDefaultButton.Default) | Button to set focus to by default |
Show
#public static DialogResult Show(string text, string caption, MessageBoxType type = MessageBoxType.Information)
Shows a message box, blocking input to all windows of the application until closed
Parameters:
| text (string) | Text for the body of the message box |
| caption (string) | Caption for the title bar or heading of the message box |
| type (MessageBoxType = MessageBoxType.Information) | Type of message box |