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

定义

创建、显示并操作 Microsoft 管理控制台 (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 管理控制台 (MMC) 编程的详细信息,请参阅 MMC 程序员指南

适用于