MsgBoxStyle 枚举
定义
指示调用 MsgBox 函数时显示的按钮。Indicates which buttons to display when calling the MsgBox function.
此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。
public enum class MsgBoxStyle
[System.Flags]
public enum MsgBoxStyle
[<System.Flags>]
type MsgBoxStyle =
Public Enum MsgBoxStyle
- 继承
- 属性
字段
| AbortRetryIgnore | 2 | “中止”、“重试”和“忽略”按钮。Abort, Retry, and Ignore buttons. 此成员等效于 Visual Basic 常量 |
| ApplicationModal | 0 | 应用程序模式消息框。Application modal message box. 此成员等效于 Visual Basic 常量 |
| Critical | 16 | 关键消息。Critical message. 此成员等效于 Visual Basic 常量 |
| DefaultButton1 | 0 | 第一个按钮是默认值。First button is default. 此成员等效于 Visual Basic 常量 |
| DefaultButton2 | 256 | 第二个按钮是默认值。Second button is default. 此成员等效于 Visual Basic 常量 |
| DefaultButton3 | 512 | 第三个按钮是默认值。Third button is default. 此成员等效于 Visual Basic 常量 |
| Exclamation | 48 | 警告消息。Warning message. 此成员等效于 Visual Basic 常量 |
| Information | 64 | 信息消息。Information message. 此成员等效于 Visual Basic 常量 |
| MsgBoxHelp | 16384 | 帮助文本。Help text. 此成员等效于 Visual Basic 常量 |
| MsgBoxRight | 524288 | 右对齐文本。Right-aligned text. 此成员等效于 Visual Basic 常量 |
| MsgBoxRtlReading | 1048576 | 从右到左阅读的文本(希伯来语和阿拉伯语系统)。Right-to-left reading text (Hebrew and Arabic systems). 此成员等效于 Visual Basic 常量 |
| MsgBoxSetForeground | 65536 | 前景消息框窗口。Foreground message box window. 此成员等效于 Visual Basic 常量 |
| OkCancel | 1 | “确定”和“取消”按钮。OK and Cancel buttons. 此成员等效于 Visual Basic 常量 |
| OKCancel | 1 | “确定”和“取消”按钮。OK and Cancel buttons. 此成员等效于 Visual Basic 常量 |
| OkOnly | 0 | 仅“确定”按钮(默认)。OK button only (default). 此成员等效于 Visual Basic 常量 |
| OKOnly | 0 | 仅“确定”按钮(默认)。OK button only (default). 此成员等效于 Visual Basic 常量 |
| Question | 32 | 警告查询。Warning query. 此成员等效于 Visual Basic 常量 |
| RetryCancel | 5 | “重试”和“取消”按钮。Retry and Cancel buttons. 此成员等效于 Visual Basic 常量 |
| SystemModal | 4096 | 系统模式消息框。System modal message box. 此成员等效于 Visual Basic 常量 |
| YesNo | 4 | “是”和“否”按钮。Yes and No buttons. 此成员等效于 Visual Basic 常量 |
| YesNoCancel | 3 | “是”、“否”和“取消”按钮。Yes, No, and Cancel buttons. 此成员等效于 Visual Basic 常量 |
注解
调用 MsgBox 函数时,可以 MsgBoxStyle 在代码中使用枚举来替换实际值。When you call the MsgBox function, you can use the MsgBoxStyle enumeration in your code in place of the actual values. Buttons参数采用 MsgBoxStyle 枚举成员。The Buttons argument takes the MsgBoxStyle enumeration members.