MsgBoxStyle Enum

Definition

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
MsgBoxStyle
Attributes

Fields

AbortRetryIgnore 2

Abort, Retry, and Ignore buttons. This member is equivalent to the Visual Basic constant vbAbortRetryIgnore.

ApplicationModal 0

Application modal message box. This member is equivalent to the Visual Basic constant vbApplicationModal.

Critical 16

Critical message. This member is equivalent to the Visual Basic constant vbCritical.

DefaultButton1 0

First button is default. This member is equivalent to the Visual Basic constant vbDefaultButton1.

DefaultButton2 256

Second button is default. This member is equivalent to the Visual Basic constant vbDefaultButton2.

DefaultButton3 512

Third button is default. This member is equivalent to the Visual Basic constant vbDefaultButton3.

Exclamation 48

Warning message. This member is equivalent to the Visual Basic constant vbExclamation.

Information 64

Information message. This member is equivalent to the Visual Basic constant vbInformation.

MsgBoxHelp 16384

Help text. This member is equivalent to the Visual Basic constant vbMsgBoxHelp.

MsgBoxRight 524288

Right-aligned text. This member is equivalent to the Visual Basic constant vbMsgBoxRight.

MsgBoxRtlReading 1048576

Right-to-left reading text (Hebrew and Arabic systems). This member is equivalent to the Visual Basic constant vbMsgBoxRtlReading.

MsgBoxSetForeground 65536

Foreground message box window. This member is equivalent to the Visual Basic constant vbMsgBoxSetForeground.

OkCancel 1

OK and Cancel buttons. This member is equivalent to the Visual Basic constant vbOKCancel.

OKCancel 1

OK and Cancel buttons. This member is equivalent to the Visual Basic constant vbOKCancel.

OkOnly 0

OK button only (default). This member is equivalent to the Visual Basic constant vbOKOnly.

OKOnly 0

OK button only (default). This member is equivalent to the Visual Basic constant vbOKOnly.

Question 32

Warning query. This member is equivalent to the Visual Basic constant vbQuestion.

RetryCancel 5

Retry and Cancel buttons. This member is equivalent to the Visual Basic constant vbRetryCancel.

SystemModal 4096

System modal message box. This member is equivalent to the Visual Basic constant vbSystemModal.

YesNo 4

Yes and No buttons. This member is equivalent to the Visual Basic constant vbYesNo.

YesNoCancel 3

Yes, No, and Cancel buttons. This member is equivalent to the Visual Basic constant vbYesNoCancel.

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.

Applies to

See also