Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MessageBox.Show Method

Displays a message box.

Name Description
MessageBox.Show (String) Displays a message box that has a message and that returns a result.
MessageBox.Show (String, String) Displays a message box that has a message and title bar caption; and that returns a result.
MessageBox.Show (Window, String) Displays a message box in front of the specified window. The message box displays a message and returns a result.
MessageBox.Show (String, String, MessageBoxButton) Displays a message box that has a message, title bar caption, and button; and that returns a result.
MessageBox.Show (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.
MessageBox.Show (String, String, MessageBoxButton, MessageBoxImage) Displays a message box that has a message, title bar caption, button, and icon; and that returns a result.
MessageBox.Show (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.
MessageBox.Show (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.
MessageBox.Show (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.
MessageBox.Show (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.
MessageBox.Show (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.
MessageBox.Show (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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft