Share via


IUIService.ShowMessage 메서드

정의

지정한 메시지를 메시지 상자에 표시합니다.

오버로드

ShowMessage(String)

지정한 메시지를 메시지 상자에 표시합니다.

ShowMessage(String, String)

지정한 메시지를 지정한 캡션과 함께 메시지 상자에 표시합니다.

ShowMessage(String, String, MessageBoxButtons)

메시지 상자에, 지정한 메시지 및 배치할 지정한 캡션과 단추를 함께 표시합니다.

ShowMessage(String)

지정한 메시지를 메시지 상자에 표시합니다.

public:
 void ShowMessage(System::String ^ message);
public void ShowMessage (string message);
abstract member ShowMessage : string -> unit
Public Sub ShowMessage (message As String)

매개 변수

message
String

표시할 메시지입니다.

예제

다음 코드 예제에서는 메시지 상자를 표시 하는 메서드를 사용 ShowMessage 하는 방법을 보여 줍니다.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

설명

이 메서드는 메시지 상자의 표시가 개발 환경과 제대로 통합되도록 합니다.

적용 대상

ShowMessage(String, String)

지정한 메시지를 지정한 캡션과 함께 메시지 상자에 표시합니다.

public:
 void ShowMessage(System::String ^ message, System::String ^ caption);
public void ShowMessage (string message, string caption);
abstract member ShowMessage : string * string -> unit
Public Sub ShowMessage (message As String, caption As String)

매개 변수

message
String

표시할 메시지입니다.

caption
String

메시지 상자에 사용할 캡션입니다.

예제

다음 코드 예제에서는 인스턴스를 IUIService 가져오고 서비스의 ShowMessage 메서드를 호출하려고 시도합니다.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

설명

이 메서드는 메시지 상자의 표시가 개발 환경과 제대로 통합되도록 합니다.

적용 대상

ShowMessage(String, String, MessageBoxButtons)

메시지 상자에, 지정한 메시지 및 배치할 지정한 캡션과 단추를 함께 표시합니다.

public:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ message, System::String ^ caption, System::Windows::Forms::MessageBoxButtons buttons);
public System.Windows.Forms.DialogResult ShowMessage (string message, string caption, System.Windows.Forms.MessageBoxButtons buttons);
abstract member ShowMessage : string * string * System.Windows.Forms.MessageBoxButtons -> System.Windows.Forms.DialogResult
Public Function ShowMessage (message As String, caption As String, buttons As MessageBoxButtons) As DialogResult

매개 변수

message
String

표시할 메시지입니다.

caption
String

메시지 상자에 사용할 캡션입니다.

buttons
MessageBoxButtons

MessageBoxButtonsOK, OKCancel, YesNo 또는 YesNoCancel 값 중 하나입니다.

반환

DialogResult

이 대화 상자가 반환하는 결과 코드를 나타내는 DialogResult 값 중 하나입니다.

예제

다음 코드 예제에서는 메시지 상자를 표시 하는 메서드를 사용 ShowMessage 하는 방법을 보여 줍니다.

IUIService^ UIservice = dynamic_cast<IUIService^>(this->GetService( System::Windows::Forms::Design::IUIService::typeid ));
if ( UIservice != nullptr )
      UIservice->ShowMessage( "Test message", "Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore );
IUIService UIservice = (IUIService)this.GetService( 
    typeof( System.Windows.Forms.Design.IUIService ) );
if( UIservice != null )            
    UIservice.ShowMessage("Test message", "Test caption", 
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore);
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If (UIservice IsNot Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

설명

이 메서드는 메시지 상자의 표시가 개발 환경과 제대로 통합되도록 합니다.

추가 정보

적용 대상