MsgBoxStyle Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates which buttons to display when calling the MsgBox
function.
This enumeration supports a bitwise combination of its member values.
public enum class MsgBoxStyle
[System.Flags]
public enum MsgBoxStyle
[<System.Flags>]
type MsgBoxStyle =
Public Enum MsgBoxStyle
- Inheritance
- Attributes
Fields
Name | Value | Description |
---|---|---|
ApplicationModal | 0 | Application modal message box. This member is equivalent to the Visual Basic constant |
DefaultButton1 | 0 | First button is default. This member is equivalent to the Visual Basic constant |
OkOnly | 0 | OK button only (default). This member is equivalent to the Visual Basic constant |
OKOnly | 0 | OK button only (default). This member is equivalent to the Visual Basic constant |
OkCancel | 1 | OK and Cancel buttons. This member is equivalent to the Visual Basic constant |
OKCancel | 1 | OK and Cancel buttons. This member is equivalent to the Visual Basic constant |
AbortRetryIgnore | 2 | Abort, Retry, and Ignore buttons. This member is equivalent to the Visual Basic constant |
YesNoCancel | 3 | Yes, No, and Cancel buttons. This member is equivalent to the Visual Basic constant |
YesNo | 4 | Yes and No buttons. This member is equivalent to the Visual Basic constant |
RetryCancel | 5 | Retry and Cancel buttons. This member is equivalent to the Visual Basic constant |
Critical | 16 | Critical message. This member is equivalent to the Visual Basic constant |
Question | 32 | Warning query. This member is equivalent to the Visual Basic constant |
Exclamation | 48 | Warning message. This member is equivalent to the Visual Basic constant |
Information | 64 | Information message. This member is equivalent to the Visual Basic constant |
DefaultButton2 | 256 | Second button is default. This member is equivalent to the Visual Basic constant |
DefaultButton3 | 512 | Third button is default. This member is equivalent to the Visual Basic constant |
SystemModal | 4096 | System modal message box. This member is equivalent to the Visual Basic constant |
MsgBoxHelp | 16384 | Help text. This member is equivalent to the Visual Basic constant |
MsgBoxSetForeground | 65536 | Foreground message box window. This member is equivalent to the Visual Basic constant |
MsgBoxRight | 524288 | Right-aligned text. This member is equivalent to the Visual Basic constant |
MsgBoxRtlReading | 1048576 | Right-to-left reading text (Hebrew and Arabic systems). This member is equivalent to the Visual Basic constant |
Remarks
When you call the MsgBox
function, you can use the MsgBoxStyle
enumeration in your code in place of the actual values. The Buttons
argument takes the MsgBoxStyle
enumeration members.