IUIService.ShowMessage メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したメッセージをメッセージ ボックスに表示します。
オーバーロード
| 名前 | 説明 |
|---|---|
| ShowMessage(String) |
指定したメッセージをメッセージ ボックスに表示します。 |
| ShowMessage(String, String) |
指定したキャプションを持つメッセージ ボックスに、指定したメッセージを表示します。 |
| ShowMessage(String, String, MessageBoxButtons) |
指定したキャプションとボタンを含むメッセージ ボックスに、指定したメッセージをダイアログ ボックスに表示します。 |
ShowMessage(String)
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
指定したメッセージをメッセージ ボックスに表示します。
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)
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
指定したキャプションを持つメッセージ ボックスに、指定したメッセージを表示します。
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)
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
- ソース:
- IUIService.cs
指定したキャプションとボタンを含むメッセージ ボックスに、指定したメッセージをダイアログ ボックスに表示します。
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
MessageBoxButtons値の 1 つ:OK、OKCancel、YesNo、またはYesNoCancel。
返品
ダイアログ ボックスによって返される結果コードを示す DialogResult 値の 1 つ。
例
次のコード例では、 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
注釈
この方法により、メッセージ ボックスの表示が開発環境と適切に統合されます。