次の方法で共有


ModulePage.ShowMessage メソッド

定義

最上位ウィンドウの親となるメッセージ ボックスを表示します。

オーバーロード

ShowMessage(String, MessageBoxButtons, MessageBoxIcon)

指定したテキスト、ボタン セット、およびアイコンを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String, String)

指定したテキストとキャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String)

指定したテキストを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)

指定したテキスト、ボタン セット、アイコン、および既定のボタンを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, String)

指定したテキスト、ボタン セット、アイコン、キャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, String)

指定したテキスト、ボタン セット、アイコン、既定のボタン、キャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

ShowMessage(String, MessageBoxButtons, MessageBoxIcon)

指定したテキスト、ボタン セット、およびアイコンを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ text, System::Windows::Forms::MessageBoxButtons buttons, System::Windows::Forms::MessageBoxIcon icon);
protected System.Windows.Forms.DialogResult ShowMessage (string text, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon);
member this.ShowMessage : string * System.Windows.Forms.MessageBoxButtons * System.Windows.Forms.MessageBoxIcon -> System.Windows.Forms.DialogResult
Protected Function ShowMessage (text As String, buttons As MessageBoxButtons, icon As MessageBoxIcon) As DialogResult

パラメーター

text
String

表示するメッセージ。

buttons
MessageBoxButtons

MessageBoxButtons表示するオブジェクト。

icon
MessageBoxIcon

MessageBoxIcon表示するオブジェクト。

戻り値

選択した DialogResult ボタンを示す値の 1 つ。

次の例では、メッセージ ダイアログ ボックスを表示します。

DialogResult dr = ShowMessage("MyMessage",
    MessageBoxButtons.AbortRetryIgnore,
    MessageBoxIcon.Hand
);
if (dr == DialogResult.Abort)
    InitiateShutdownSequence("0001");

注釈

ダイアログ ボックスのキャプションは、 title コンストラクターの Microsoft.Web.Management.Client.ModulePageInfo.ModulePageInfo パラメーターです。

適用対象

ShowMessage(String, String)

指定したテキストとキャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 void ShowMessage(System::String ^ text, System::String ^ caption);
protected void ShowMessage (string text, string caption);
member this.ShowMessage : string * string -> unit
Protected Sub ShowMessage (text As String, caption As String)

パラメーター

text
String

表示するメッセージ。

caption
String

タイトル バーのキャプション。

次の例では、メッセージ ダイアログ ボックスを表示します。

ShowMessage("MyMessage", "My caption");

注釈

メッセージ ボックスが情報アイコンと共に表示されます。

適用対象

ShowMessage(String)

指定したテキストを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 void ShowMessage(System::String ^ text);
protected void ShowMessage (string text);
member this.ShowMessage : string -> unit
Protected Sub ShowMessage (text As String)

パラメーター

text
String

表示するメッセージ。

次の例では、メッセージ ダイアログ ボックスを表示します。

ShowMessage("MyMessage");

注釈

メッセージ ボックスが情報アイコンと共に表示されます。 ダイアログ ボックスのキャプションは、 title コンストラクターの Microsoft.Web.Management.Client.ModulePageInfo.ModulePageInfo パラメーターです。

適用対象

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)

指定したテキスト、ボタン セット、アイコン、および既定のボタンを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ text, System::Windows::Forms::MessageBoxButtons buttons, System::Windows::Forms::MessageBoxIcon icon, System::Windows::Forms::MessageBoxDefaultButton defaultButton);
protected System.Windows.Forms.DialogResult ShowMessage (string text, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton);
member this.ShowMessage : string * System.Windows.Forms.MessageBoxButtons * System.Windows.Forms.MessageBoxIcon * System.Windows.Forms.MessageBoxDefaultButton -> System.Windows.Forms.DialogResult
Protected Function ShowMessage (text As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButton As MessageBoxDefaultButton) As DialogResult

パラメーター

text
String

表示するメッセージ。

buttons
MessageBoxButtons

MessageBoxButtons表示するオブジェクト。

icon
MessageBoxIcon

MessageBoxIcon表示するオブジェクト。

defaultButton
MessageBoxDefaultButton

MessageBoxDefaultButton オブジェクト。

戻り値

選択した DialogResult ボタンを示す値の 1 つ。

次の例では、メッセージ ダイアログ ボックスを表示します。

DialogResult dr = ShowMessage("MyMessage",
    MessageBoxButtons.AbortRetryIgnore,
    MessageBoxIcon.Hand,
    MessageBoxDefaultButton.Button1
);
if (dr == DialogResult.Abort)
    InitiateShutdownSequence("0001");

注釈

ダイアログ ボックスのキャプションは、 title コンストラクターの Microsoft.Web.Management.Client.ModulePageInfo.ModulePageInfo パラメーターです。

適用対象

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, String)

指定したテキスト、ボタン セット、アイコン、キャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ text, System::Windows::Forms::MessageBoxButtons buttons, System::Windows::Forms::MessageBoxIcon icon, System::String ^ caption);
protected System.Windows.Forms.DialogResult ShowMessage (string text, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, string caption);
member this.ShowMessage : string * System.Windows.Forms.MessageBoxButtons * System.Windows.Forms.MessageBoxIcon * string -> System.Windows.Forms.DialogResult
Protected Function ShowMessage (text As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, caption As String) As DialogResult

パラメーター

text
String

表示するメッセージ。

buttons
MessageBoxButtons

MessageBoxButtons表示するオブジェクト。

icon
MessageBoxIcon

表示する MessageBoxIcon

caption
String

タイトル バーのキャプション。

戻り値

選択した DialogResult ボタンを示す値の 1 つ。

次の例では、メッセージ ダイアログ ボックスを表示します。

DialogResult dr = ShowMessage("MyMessage",
    MessageBoxButtons.AbortRetryIgnore,
    MessageBoxIcon.Hand,
    "My title bar title"
);
if (dr == DialogResult.Abort)
    InitiateShutdownSequence("0001");

適用対象

ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton, String)

指定したテキスト、ボタン セット、アイコン、既定のボタン、キャプションを使用して、最上位ウィンドウに親されるメッセージ ボックスを表示します。

protected:
 System::Windows::Forms::DialogResult ShowMessage(System::String ^ text, System::Windows::Forms::MessageBoxButtons buttons, System::Windows::Forms::MessageBoxIcon icon, System::Windows::Forms::MessageBoxDefaultButton defaultButton, System::String ^ caption);
protected System.Windows.Forms.DialogResult ShowMessage (string text, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, string caption);
member this.ShowMessage : string * System.Windows.Forms.MessageBoxButtons * System.Windows.Forms.MessageBoxIcon * System.Windows.Forms.MessageBoxDefaultButton * string -> System.Windows.Forms.DialogResult
Protected Function ShowMessage (text As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButton As MessageBoxDefaultButton, caption As String) As DialogResult

パラメーター

text
String

表示するメッセージ。

buttons
MessageBoxButtons

MessageBoxButtons表示するオブジェクト。

icon
MessageBoxIcon

MessageBoxIcon表示するオブジェクト。

defaultButton
MessageBoxDefaultButton

MessageBoxDefaultButton オブジェクト。

caption
String

タイトル バーのキャプション。

戻り値

選択した DialogResult ボタンを示す値の 1 つ。

次の例では、メッセージ ダイアログ ボックスを表示します。

DialogResult dr = ShowMessage("MyMessage",
    MessageBoxButtons.AbortRetryIgnore,
    MessageBoxIcon.Hand,
    MessageBoxDefaultButton.Button1,
    "My title bar title"
);
if (dr == DialogResult.Abort)
    InitiateShutdownSequence("0001");

適用対象