Displays a message box.

Namespace: System.Extensions.Windows.Forms
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static DialogResult Show(
	Control parent,
	string text,
	string caption,
	MessageBoxButtons buttons,
	MessageBoxIcon icon,
	MessageBoxDefaultButton defaultButton,
	MessageBoxOptions options,
	bool displayHelpButton
)
Visual Basic
Public Shared Function Show ( 
	parent As Control,
	text As String,
	caption As String,
	buttons As MessageBoxButtons,
	icon As MessageBoxIcon,
	defaultButton As MessageBoxDefaultButton,
	options As MessageBoxOptions,
	displayHelpButton As Boolean
) As DialogResult
Visual C++
public:
static DialogResult Show(
	Control^ parent, 
	String^ text, 
	String^ caption, 
	MessageBoxButtons buttons, 
	MessageBoxIcon icon, 
	MessageBoxDefaultButton defaultButton, 
	MessageBoxOptions options, 
	bool displayHelpButton
)
F#
static member Show : 
        parent : Control * 
        text : string * 
        caption : string * 
        buttons : MessageBoxButtons * 
        icon : MessageBoxIcon * 
        defaultButton : MessageBoxDefaultButton * 
        options : MessageBoxOptions * 
        displayHelpButton : bool -> DialogResult 

Parameters

parent
Type: System.Windows.Forms..::..Control
The control that will own the modal dialog box.
text
Type: System..::..String
The text to display in the message box.
caption
Type: System..::..String
The text to display in the title bar of the message box.
buttons
Type: System.Windows.Forms..::..MessageBoxButtons
One of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
Type: System.Windows.Forms..::..MessageBoxIcon
One of the MessageBoxIcon values that specifies which icon to display in the message box.
defaultButton
Type: System.Windows.Forms..::..MessageBoxDefaultButton
One of the MessageBoxDefaultButton values that specifies the default button for the message box.
options
Type: System.Windows.Forms..::..MessageBoxOptions
One 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
Type: System..::..Boolean
A value indicating whether to display the help button on the message box.

Return Value

Type: DialogResult
One of the DialogResult values.

See Also