共用方式為


AspNetManagementUtility.MessageBox(IntPtr, String, String, Int32) 方法

定義

在 Microsoft Management Console (MMC) 的 ASP.NET 嵌入式管理單元中建立、顯示和操作訊息方塊。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static int MessageBox(IntPtr hWnd, System::String ^ text, System::String ^ caption, int type);
public static int MessageBox (IntPtr hWnd, string text, string caption, int type);
static member MessageBox : nativeint * string * string * int -> int
Public Shared Function MessageBox (hWnd As IntPtr, text As String, caption As String, type As Integer) As Integer

參數

hWnd
IntPtr

nativeint

要建立之訊息方塊的擁有人控制代碼。 若 hWnd 為 Null (Visual Basic 中的 Nothing),則訊息方塊便沒有主控視窗。

text
String

要顯示之訊息方塊的訊息。

caption
String

訊息方塊標題。

type
Int32

訊息方塊的內容和行為。

傳回

當訊息方塊具有 [取消] 按鈕,且按下 ESC 鍵或按一下 [取消] 時,則為 IDCANCEL。 若訊息沒有 [取消] 按鈕,則按下 ESC 鍵沒有作用。
如果函式失敗,則會傳回 0。
如果函式成功,則傳回值是下列其中一個功能表項目值:

傳回值 描述
IDABORT 已按下中止
IDCANCEL 已按兩下 [取消]。
IDCONTINUE 已按兩下 [繼續]。
IDIGNORE 已按下 [忽略]。
IDNO 按下 。
IDOK 按兩下 [確定]。
IDRETRY 已按兩下 [重試]。
IDTRYAGAIN 已按兩下 [再試一次 ]。
IDYES 已按兩下 [是 ]。

備註

如需使用 AspNetManagementUtility 類別進行程式設計的詳細資訊,以及 Microsoft Management Console (MMC) ,請參閱 MMC 程式設計人員指南

適用於