[This is preliminary documentation and is subject to change.]

Displays a message box that has a message, title bar caption, button, and icon; and that returns a result.

Namespace: Tools.WindowsT.IndependentT
Assembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public static MessageBoxResult Show(
	string messageBoxText,
	string caption,
	MessageBoxButton button,
	MessageBoxImage icon
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Shared Function Show ( _
	messageBoxText As String, _
	caption As String, _
	button As MessageBoxButton, _
	icon As MessageBoxImage _
) As MessageBoxResult
Visual C++
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
public:
static MessageBoxResult Show(
	String^ messageBoxText, 
	String^ caption, 
	MessageBoxButton button, 
	MessageBoxImage icon
)
F#
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
static member Show : 
        messageBoxText:string * 
        caption:string * 
        button:MessageBoxButton * 
        icon:MessageBoxImage -> MessageBoxResult 
JScript
public static function Show(
	messageBoxText : String, 
	caption : String, 
	button : MessageBoxButton, 
	icon : MessageBoxImage
) : MessageBoxResult

Parameters

messageBoxText
Type: System..::..String
A String that specifies the text to display.
caption
Type: System..::..String
A String that specifies the title bar caption to display.
button
Type: System.Windows..::..MessageBoxButton
A MessageBoxButton value that specifies which button or buttons to display.
icon
Type: System.Windows..::..MessageBoxImage
A MessageBoxImage value that specifies the icon to display.

Return Value

A MessageBoxResult value that specifies which message box button is clicked by the user.

Remarks

This function is provided mainly for compatibility with MessageBox. You'd bete use overload which's icon parameter is MessageBox..::..MessageBoxIcons. See ConvertIconConstant(MessageBoxIcon) for explanation.

Exceptions

ExceptionCondition
System.ComponentModel..::..InvalidEnumArgumentExceptionbutton is not member of MessageBoxButton =or = icon is not member of MessageBoxImage
System.Reflection..::..TargetInvocationExceptionThere was an error working working with customized static properties such as DefaultImplementation or message box implementation failed.

See Also