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
)
Visual Basic
Public Shared Function Show ( 
	parent As Control,
	text As String,
	caption As String,
	buttons As MessageBoxButtons,
	icon As MessageBoxIcon,
	defaultButton As MessageBoxDefaultButton
) As DialogResult
Visual C++
public:
static DialogResult Show(
	Control^ parent, 
	String^ text, 
	String^ caption, 
	MessageBoxButtons buttons, 
	MessageBoxIcon icon, 
	MessageBoxDefaultButton defaultButton
)
F#
static member Show : 
        parent : Control * 
        text : string * 
        caption : string * 
        buttons : MessageBoxButtons * 
        icon : MessageBoxIcon * 
        defaultButton : MessageBoxDefaultButton -> 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.

Return Value

Type: DialogResult
One of the DialogResult values.

See Also