次の方法で共有


IUIService.ShowMessage メソッド (String)

指定したメッセージをメッセージ ボックスに表示します。

Sub ShowMessage( _
   ByVal message As String _)
[C#]
void ShowMessage(
   stringmessage);
[C++]
void ShowMessage(
   String* message);
[JScript]
function ShowMessage(
   message : String);

パラメータ

  • message
    表示するメッセージ。

解説

このメソッドは、メッセージ ボックスの表示が開発環境に適切に統合されるようにします。

使用例

 
Dim UIservice As IUIService = CType(Me.GetService( _
    GetType(System.Windows.Forms.Design.IUIService)), IUIService)
If Not (UIservice Is Nothing) Then
    UIservice.ShowMessage("Test message", "Test caption", _
        System.Windows.Forms.MessageBoxButtons.AbortRetryIgnore)
End If

[C#] 
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);

[C++] 
IUIService* UIservice = dynamic_cast<IUIService*>(this->GetService(__typeof(System::Windows::Forms::Design::IUIService)));
if (UIservice != 0)
   UIservice->ShowMessage(S"Test message", S"Test caption", System::Windows::Forms::MessageBoxButtons::AbortRetryIgnore);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

IUIService インターフェイス | IUIService メンバ | System.Windows.Forms.Design 名前空間 | IUIService.ShowMessage オーバーロードの一覧