MessageBox.Show 메서드

정의

메시지 상자를 표시합니다.

오버로드

Name Description
Show(String)

메시지가 있고 결과를 반환하는 메시지 상자를 표시합니다.

Show(String, String)

메시지 및 제목 표시줄 캡션이 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

Show(Window, String)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지가 표시되고 결과가 반환됩니다.

Show(String, String, MessageBoxButton)

메시지, 제목 표시줄 캡션 및 단추가 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

Show(Window, String, String)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지 및 제목 표시줄 캡션이 표시됩니다. 그리고 결과를 반환합니다.

Show(String, String, MessageBoxButton, MessageBoxImage)

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

Show(Window, String, String, MessageBoxButton)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션 및 단추가 표시됩니다. 또한 결과를 반환합니다.

Show(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 기본 메시지 상자 결과를 수락하고 결과를 반환하는 입니다.

Show(Window, String, String, MessageBoxButton, MessageBoxImage)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 또한 결과를 반환합니다.

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

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 기본 메시지 상자 결과를 허용하고, 지정된 옵션을 준수하고, 결과를 반환합니다.

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

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 기본 메시지 상자 결과를 수락하고 결과를 반환합니다.

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

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 기본 메시지 상자 결과를 수락하고, 지정된 옵션을 준수하고, 결과를 반환합니다.

설명

소유자 창을 지정할 수 있는 메서드의 Show 오버로드를 사용합니다. 그렇지 않으면 메시지 상자는 현재 활성 상태인 창에서 소유합니다.

Show(String)

메시지가 있고 결과를 반환하는 메시지 상자를 표시합니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText);
public static System.Windows.MessageBoxResult Show(string messageBoxText);
[<System.Security.SecurityCritical>]
static member Show : string -> System.Windows.MessageBoxResult
static member Show : string -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Hello, MessageBox!";
    // Show message box
    MessageBoxResult result = MessageBox.Show(message);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Hello, MessageBox!"
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message)
End Sub

적용 대상

Show(String, String)

메시지 및 제목 표시줄 캡션이 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText, System::String ^ caption);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption);
[<System.Security.SecurityCritical>]
static member Show : string * string -> System.Windows.MessageBoxResult
static member Show : string * string -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String, caption As String) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Message text";
    string caption = "Caption text";
    // Show message box
    MessageBoxResult result = MessageBox.Show(message, caption);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Message text"
    Dim caption As String = "Caption text"
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message, caption)
End Sub

적용 대상

Show(Window, String)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지가 표시되고 결과가 반환됩니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상

Show(String, String, MessageBoxButton)

메시지, 제목 표시줄 캡션 및 단추가 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button);
[<System.Security.SecurityCritical>]
static member Show : string * string * System.Windows.MessageBoxButton -> System.Windows.MessageBoxResult
static member Show : string * string * System.Windows.MessageBoxButton -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String, caption As String, button As MessageBoxButton) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Hello, MessageBox!";
    string caption = "Caption text";
    MessageBoxButton buttons = MessageBoxButton.OKCancel;
    // Show message box
    MessageBoxResult result = MessageBox.Show(message, caption, buttons);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Hello, MessageBox!"
    Dim caption As String = "Caption text"
    Dim buttons As MessageBoxButton = MessageBoxButton.OKCancel
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message, caption, buttons)
End Sub

적용 대상

Show(Window, String, String)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지 및 제목 표시줄 캡션이 표시됩니다. 그리고 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText, System::String ^ caption);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string * string -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string * string -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String, caption As String) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상

Show(String, String, MessageBoxButton, MessageBoxImage)

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 그러면 결과가 반환됩니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon);
[<System.Security.SecurityCritical>]
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage -> System.Windows.MessageBoxResult
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Hello, MessageBox!";
    string caption = "Caption text";
    MessageBoxButton buttons = MessageBoxButton.OKCancel;
    MessageBoxImage icon = MessageBoxImage.Information;
    // Show message box
    MessageBoxResult result = MessageBox.Show(message, caption, buttons, icon);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Hello, MessageBox!"
    Dim caption As String = "Caption text"
    Dim buttons As MessageBoxButton = MessageBoxButton.OKCancel
    Dim icon As MessageBoxImage = MessageBoxImage.Information
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message, caption, buttons, icon)
End Sub

적용 대상

Show(Window, String, String, MessageBoxButton)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션 및 단추가 표시됩니다. 또한 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String, caption As String, button As MessageBoxButton) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상

Show(String, String, MessageBoxButton, MessageBoxImage, MessageBoxResult)

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 기본 메시지 상자 결과를 수락하고 결과를 반환하는 입니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon, System::Windows::MessageBoxResult defaultResult);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult);
[<System.Security.SecurityCritical>]
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult -> System.Windows.MessageBoxResult
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage, defaultResult As MessageBoxResult) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

defaultResult
MessageBoxResult

MessageBoxResult 메시지 상자의 기본 결과를 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Hello, MessageBox!";
    string caption = "Caption text";
    MessageBoxButton buttons = MessageBoxButton.OKCancel;
    MessageBoxImage icon = MessageBoxImage.Information;
    MessageBoxResult defaultResult = MessageBoxResult.OK;
    // Show message box
    MessageBoxResult result = MessageBox.Show(message, caption, buttons, icon, defaultResult);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Hello, MessageBox!"
    Dim caption As String = "Caption text"
    Dim buttons As MessageBoxButton = MessageBoxButton.OKCancel
    Dim icon As MessageBoxImage = MessageBoxImage.Information
    Dim defaultResult As MessageBoxResult = MessageBoxResult.OK
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message, caption, buttons, icon, defaultResult)
End Sub

적용 대상

Show(Window, String, String, MessageBoxButton, MessageBoxImage)

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 또한 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상

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

메시지, 제목 표시줄 캡션, 단추 및 아이콘이 있는 메시지 상자를 표시합니다. 기본 메시지 상자 결과를 허용하고, 지정된 옵션을 준수하고, 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon, System::Windows::MessageBoxResult defaultResult, System::Windows::MessageBoxOptions options);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult, System.Windows.MessageBoxOptions options);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult, System.Windows.MessageBoxOptions options);
[<System.Security.SecurityCritical>]
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult * System.Windows.MessageBoxOptions -> System.Windows.MessageBoxResult
static member Show : string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult * System.Windows.MessageBoxOptions -> System.Windows.MessageBoxResult
Public Shared Function Show (messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage, defaultResult As MessageBoxResult, options As MessageBoxOptions) As MessageBoxResult

매개 변수

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

defaultResult
MessageBoxResult

MessageBoxResult 메시지 상자의 기본 결과를 지정하는 값입니다.

options
MessageBoxOptions

MessageBoxOptions 옵션을 지정하는 값 개체입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

예제

다음 예제에서는 메서드의 이 오버로드를 Show 사용하는 방법을 보여줍니다.

private void ShowMessageBoxButton_Click(object sender, RoutedEventArgs e)
{
    // Configure message box
    string message = "Hello, MessageBox!";
    string caption = "Caption text";
    MessageBoxButton buttons = MessageBoxButton.OKCancel;
    MessageBoxImage icon = MessageBoxImage.Information;
    MessageBoxResult defaultResult = MessageBoxResult.OK;
    MessageBoxOptions options = MessageBoxOptions.RtlReading;
    // Show message box
    MessageBoxResult result = MessageBox.Show(message, caption, buttons, icon, defaultResult, options);
}
Private Sub showMessageBoxButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ' Configure message box
    Dim message As String = "Hello, MessageBox!"
    Dim caption As String = "Caption text"
    Dim buttons As MessageBoxButton = MessageBoxButton.OKCancel
    Dim icon As MessageBoxImage = MessageBoxImage.Information
    Dim defaultResult As MessageBoxResult = MessageBoxResult.OK
    Dim options As MessageBoxOptions = MessageBoxOptions.RtlReading
    ' Show message box
    Dim result As MessageBoxResult = MessageBox.Show(message, caption, buttons, icon, defaultResult, options)
End Sub

적용 대상

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

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 기본 메시지 상자 결과를 수락하고 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon, System::Windows::MessageBoxResult defaultResult);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage, defaultResult As MessageBoxResult) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

defaultResult
MessageBoxResult

MessageBoxResult 메시지 상자의 기본 결과를 지정하는 값입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상

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

지정된 창 앞에 메시지 상자를 표시합니다. 메시지 상자에 메시지, 제목 표시줄 캡션, 단추 및 아이콘이 표시됩니다. 기본 메시지 상자 결과를 수락하고, 지정된 옵션을 준수하고, 결과를 반환합니다.

public:
 static System::Windows::MessageBoxResult Show(System::Windows::Window ^ owner, System::String ^ messageBoxText, System::String ^ caption, System::Windows::MessageBoxButton button, System::Windows::MessageBoxImage icon, System::Windows::MessageBoxResult defaultResult, System::Windows::MessageBoxOptions options);
[System.Security.SecurityCritical]
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult, System.Windows.MessageBoxOptions options);
public static System.Windows.MessageBoxResult Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult, System.Windows.MessageBoxOptions options);
[<System.Security.SecurityCritical>]
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult * System.Windows.MessageBoxOptions -> System.Windows.MessageBoxResult
static member Show : System.Windows.Window * string * string * System.Windows.MessageBoxButton * System.Windows.MessageBoxImage * System.Windows.MessageBoxResult * System.Windows.MessageBoxOptions -> System.Windows.MessageBoxResult
Public Shared Function Show (owner As Window, messageBoxText As String, caption As String, button As MessageBoxButton, icon As MessageBoxImage, defaultResult As MessageBoxResult, options As MessageBoxOptions) As MessageBoxResult

매개 변수

owner
Window

메시지 상자의 소유자 창을 나타내는 A Window 입니다.

messageBoxText
String

표시할 텍스트를 지정하는 A String 입니다.

caption
String

표시할 제목 표시줄 캡션을 지정하는 A String 입니다.

button
MessageBoxButton

MessageBoxButton 표시할 단추 또는 단추를 지정하는 값입니다.

icon
MessageBoxImage

MessageBoxImage 표시할 아이콘을 지정하는 값입니다.

defaultResult
MessageBoxResult

MessageBoxResult 메시지 상자의 기본 결과를 지정하는 값입니다.

options
MessageBoxOptions

MessageBoxOptions 옵션을 지정하는 값 개체입니다.

반품

MessageBoxResult 사용자가 클릭할 메시지 상자 단추를 지정하는 값입니다.

특성

설명

기본적으로 메시지 상자는 현재 활성 상태인 창 앞에 나타납니다.

추가 정보

적용 대상