2024年1月21日发(作者:)

private void button1_Click(object sender, EventArgs e)

{

(" 1 个参数 "

);

}

private void button2_Click(object sender, EventArgs e)

{

(" 2 个参数。。 ",

"亮仔提示"

);

}

private void button3_Click(object sender, EventArgs e)

{

(" 3 个参数。。。 ",

" 亮仔提示",

ancel

);

}

private void button4_Click(object sender, EventArgs e)

{

(" 4 个参数。。。 ",

" 亮仔提示",

el,

g

);

}

private void button5_Click(object sender, EventArgs e)

{

(" 5 个参数。。 。 ",

" 亮仔提示",

el,

g,

2

);

}

private void button6_Click(object sender, EventArgs e)

{

(" 6 个参数。。。 ",

" 亮仔提示",

el,

g,

2,

ding //ServiceNotification//.RightAlign // 标题向右对齐。

);

}

private void button7_Click(object sender, EventArgs e)

{

(" 7 个参数。。帮助菜单不可用。。。。。 ",

" 亮仔提示",

el,

g,

2,

lign,

true // 标题向右对齐。。。。。 );

}

private void button8_Click(object sender, EventArgs e)

{

(" 7 个参数。帮助菜单 可用。 ",

" 亮仔提示",

el,

g,

2,

lign , // 要使用默认风格,此处参数可设为 0

@"C:Documents and SettingsAdministrator桌面新建文本文档.txt"

);

}

1. 1个参数。

(string text);

// 显示具有指定文本的消息框。

// 参数:text: 要在消息框中显示的文本。

// 返回结果: Result 值之一。

2. 2个参数。

(string text, string caption);

// 显示具有指定文本和标题的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// 返回结果: Result 值之一。

3. 3个参数。

(string text, string caption, MessageBoxButtons buttons);

// 显示具有指定文本、标题和按钮的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// 返回结果: Result 值之一。

// 异常:

//dEnumArgumentException: 指定的 buttons 参数不是 eBoxButtons 的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示 eBox。这是由

teractive 属性指定的。

4. 4个参数。

(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon

icon);

// 显示具有指定文本、标题、按钮和图标的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// icon: eBoxIcon 值之一,它指定在消息框中显示哪个图标。

// 返回结果: Result 值之一。

// 异常:

// dEnumArgumentException: 指定的 buttons

参数不是 eBoxButtons 的成员。- 或 - 指定的 icon24参数不是 eBoxIcon 的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示 eBox。这是由

teractive属性指定的。

5. 5个参数。

(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon

icon, MessageBoxDefaultButton defaultButton);

// 显示具有指定文本、标题、按钮、图标和默认按钮的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// icon: eBoxIcon 值之一,它指定在消息框中显示哪个图标。

// default Button: eBoxDefaultButton 值之一,可指定消息框中的默认按钮。

// 返回结果: Result 值之一。

// 异常:

// dEnumArgumentException: buttons 不是

eBoxButtons 的成员。- 或 - icon 不是

eBoxIcon的成员。- 或 - defaultButton 不是

eBoxDefaultButton 的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示 eBox。这是由

teractive属性指定的。

6. 6个参数。

(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon

icon,MessageBoxDefaultButton defaultButton, MessageBoxOptions options);

// 显示具有指定文本、标题、按钮、图标、默认按钮和选项的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// icon: eBoxIcon 值之一,它指定在消息框中显示哪个图标。

// defaultButton: eBoxDefaultButton 值之一,可指定消息框中的默认按钮。

// options: eBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。若要使用默认值,请传入0。

// 返回结果: Result 值之一。

// 异常:

// dEnumArgumentException: buttons 不是

eBoxButtons 的成员。- 或 - icon 不是

eBoxIcon的成员。- 或 - 指定的 defaultButton 不是

eBoxDefaultButton的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示 eBox。这是由teractive属性指定的。

// ntException: options 同时指定了tDesktopOnly 和eNotification。- 或 - buttons42指定了无效的eBoxButtons 组合。

7. 7个参数一。

(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon

icon,MessageBoxDefaultButton defaultButton, MessageBoxOptions options, bool

displayHelpButton);

// 显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// icon: eBoxIcon 值之一,它指定在消息框中显示哪个图标。

// defaultButton: eBoxDefaultButton 值之一,可指定消息框中的默认按钮。

// options: eBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。若要使用默认值,请传入0。

// helpButton: 如果显示“帮助”按钮,则为 true;否则为 false。默认为

false。

// 返回结果: Result 值之一。

// 异常:34

// dEnumArgumentException: buttons 不是

eBoxButtons 的成员。- 或 - icon 不是

eBoxIcon的成员。- 或 - 指定的 defaultButton 不是

eBoxDefaultButton的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示 eBox。这是由teractive属性指定的。

// ntException: options 同时指定了tDesktopOnly 和eNotification。- 或 - buttons指定了无效的 eBoxButtons 组合。

8. 7个参数二

(string text, string caption, MessageBoxButtons buttons,MessageBoxIcon

icon, MessageBoxDefaultButton defaultButton,MessageBoxOptions options, string

helpFilePath);

// 使用指定的帮助文件显示一个具有指定文本、标题、按钮、图标、默认按钮、选项和“帮助”按钮的消息框。

// 参数:

// text: 要在消息框中显示的文本。

// caption: 要在消息框的标题栏中显示的文本。

// buttons: eBoxButtons 值之一,可指定在消息框中显示哪些按钮。

// icon: eBoxIcon 值之一,它指定在消息框中显示哪个图标。

// defaultButton: eBoxDefaultButton 值之一,可指定消息框中的默认按钮。

// options: eBoxOptions 值之一,可指定将对消息框使用哪些显示和关联选项。若要使用默认值,请传入0。

// helpFilePath: 用户单击“帮助”按钮时显示的“帮助”文件的路径和名称。

// 返回结果: Result 值之一。

// 异常:

// dEnumArgumentException: buttons 不是

eBoxButtons 的成员。- 或 - icon 不是eBoxIcon的成员。- 或 - 指定的 defaultButton 不是eBoxDefaultButton的成员。

// dOperationException: 试图在运行模式不是用户交互模式的进程中显示eBox。这是由teractive属性指定的。

// ntException: options 同时指定了tDesktopOnly 和eNotification。- 或 - buttons指定了无效的 eBoxButtons 组合。