AspNetManagementUtility.MessageBox(IntPtr, String, String, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 Microsoft Management Console(MMC)的 ASP.NET snap-in 中建立、顯示並操作訊息框。
此 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 為空(Visual Basic 中為 Nothing ),訊息框就沒有擁有者視窗。
- text
- String
訊息框要顯示的訊息。
- caption
- String
訊息框標題。
- type
- Int32
訊息框的內容與行為。
傳回
IDCANCEL,如果訊息框有 取消 按鈕,且按下 ESC 或點擊 取消 。 如果訊息沒有 取消 按鈕,按下 ESC 也沒有效果。
若函數失敗,則為 0。
若函式成功,回傳值為以下選單項目之一:
| 返回值 | Description |
|---|---|
| IDABORT | 中止被點擊。 |
| IDCANCEL | 取消被 點選了。 |
| IDCONTINUE | 已經點擊繼續。 |
| IDIGNORE | 忽略被 點選了。 |
| IDNO | 「不」被點選。 |
| IDOK | 確定點 選了。 |
| IDRETRY | 重試被點選了。 |
| 我再試一次 | 點擊了「再試一次」。 |
| IDYES | 是的 ,我點了。 |
備註
欲了解更多關於使用 AspNetManagementUtility 類別與 Microsoft Management Console(MMC)程式設計的資訊,請參閱 MMC 程式設計師指南。