Method Show
Show(object?, string?, MessageBoxButtons, MessageBoxDefaultButton)
Displays a message box in front of the specified object and with the specified text, caption, buttons, icon, and default button.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxDefaultButton defaultButton)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
Returns
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, bool)
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, bool displayHelpButton)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
displayHelpButton
booltrue to show the Help button; otherwise, false. The default is false.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string)
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string)
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, string)
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and Help keyword.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, string keyword)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
keyword
stringThe Help keyword to display when the user clicks the Help button.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, string)
Displays a message box with the specified text, caption, buttons, icon, default button, options, and Help button, using the specified Help file and Help keyword.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, string keyword)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
keyword
stringThe Help keyword to display when the user clicks the Help button.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, HelpNavigator)
Displays a message box with the specified text, caption, buttons, icon, default button,
options, and Help button, using the specified Help file and HelpNavigator
.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
navigator
HelpNavigatorOne of the HelpNavigator values.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, HelpNavigator)
Displays a message box with the specified text, caption, buttons, icon, default button,
options, and Help button, using the specified Help file and HelpNavigator
.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
navigator
HelpNavigatorOne of the HelpNavigator values.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, HelpNavigator, object)
Displays a message box with the specified text, caption, buttons, icon, default button,
options, and Help button, using the specified Help file, HelpNavigator
, and Help topic.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator, object param)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
navigator
HelpNavigatorOne of the HelpNavigator values.
param
objectThe numeric ID of the Help topic to display when the user clicks the Help button.
Returns
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions, string, HelpNavigator, object)
Displays a message box with the specified text, caption, buttons, icon,
default button, options, and Help button, using the specified Help file,
HelpNavigator
, and Help topic.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, string helpFilePath, HelpNavigator navigator, object param)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
helpFilePath
stringThe path and name of the Help file to display when the user clicks the Help button.
navigator
HelpNavigatorOne of the HelpNavigator values.
param
objectThe numeric ID of the Help topic to display when the user clicks the Help button.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions)
Displays a message box with the specified text, caption, buttons, icon, default button, and options.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)
Displays a message box with the specified text, caption, buttons, icon, and default button.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons, MessageBoxIcon)
Displays a message box with specified text, caption, buttons, and icon.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?, MessageBoxButtons)
Displays a message box with specified text, caption, and buttons.
public static DialogResult Show(object? text, string? caption, MessageBoxButtons buttons)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(object?, string?)
Displays a message box with specified text and caption.
public static DialogResult Show(object? text, string? caption)
Parameters
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(object?)
Displays a message box with specified text.
public static DialogResult Show(object? text)
Parameters
text
objectThe text to display in the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, MessageBoxOptions)
Displays a message box in front of the specified object and with the specified text, caption, buttons, icon, default button, and options.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values the specifies the default button for the message box.
options
MessageBoxOptionsOne of the MessageBoxOptions values that specifies which display and association options will be used for the message box. You may pass in 0 if you wish to use the defaults.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)
Displays a message box in front of the specified object and with the specified text, caption, buttons, icon, and default button.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
MessageBoxDefaultButtonOne of the MessageBoxDefaultButton values that specifies the default button for the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons, MessageBoxIcon)
Displays a message box in front of the specified object and with the specified text, caption, buttons, and icon.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?, MessageBoxButtons)
Displays a message box in front of the specified object and with the specified text, caption, and buttons.
public static DialogResult Show(Window? owner, object? text, string? caption, MessageBoxButtons buttons)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?, string?)
Displays a message box in front of the specified object and with the specified text and caption.
public static DialogResult Show(Window? owner, object? text, string? caption)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
Returns
- DialogResult
One of the DialogResult values.
Show(Window?, object?)
Displays a message box in front of the specified object and with the specified text.
public static DialogResult Show(Window? owner, object? text)
Parameters
owner
WindowA Window that will own the modal dialog box.
text
objectThe text to display in the message box.
Returns
- DialogResult
One of the DialogResult values.