MessageBox.Show Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Displays a message box.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticShow(String)

Displays a message box that has a message and that returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(String, String)

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

System_CAPS_pubmethodSystem_CAPS_staticShow(String, String, MessageBoxButton)

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

System_CAPS_pubmethodSystem_CAPS_staticShow(String, String, MessageBoxButton, MessageBoxImage)

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

System_CAPS_pubmethodSystem_CAPS_staticShow(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)

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

System_CAPS_pubmethodSystem_CAPS_staticShow(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult, MessageBoxOptions)

Displays a message box that has a message, title bar caption, button, and icon; and that accepts a default message box result, complies with the specified options, and returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String)

Displays a message box in front of the specified window. The message box displays a message and returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String, String)

Displays a message box in front of the specified window. The message box displays a message and title bar caption; and it returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String, String, MessageBoxButton)

Displays a message box in front of the specified window. The message box displays a message, title bar caption, and button; and it also returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String, String, MessageBoxButton, MessageBoxImage)

Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and it also returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)

Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and accepts a default message box result and returns a result.

System_CAPS_pubmethodSystem_CAPS_staticShow(Window, String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult, MessageBoxOptions)

Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and accepts a default message box result, complies with the specified options, and returns a result.

Use an overload of the Show method, which enables you to specify an owner window. Otherwise, the message box is owned by the window that is currently active.

Return to top
Show: