The Visual Basic .NET Programming Language

 <  Day Day Up  >  

The MsgBoxStyle enumeration is used by the MsgBox function in the Interaction module to indicate the look and behavior of the message box. The values in the MsgBoxStyle enumeration are flags, and one flag from each group can be combined.

Button Flags

OKOnly = 0

The OK button should be shown. Constant equivalent: vbOKOnly .

OKCancel = 1

The OK and Cancel buttons should be shown. Constant equivalent: vbOKCancel .

AbortRetryIgnore = 2

The Abort, Retry, and Ignore buttons should be shown. Constant equivalent: vbAbortRetryIgnore .

YesNoCancel = 3

The Yes, No, and Cancel buttons should be shown. Constant equivalent: vbYesNoCancel .

YesNo = 4

The Yes and No buttons should be shown. Constant equivalent: vbYesNo .

RetryCancel = 5

The Retry and Cancel buttons should be shown. Constant equivalent: vbRetryCancel .

Icon Flags

Critical = 16

The Critical icon should be shown. Constant equivalent: vbCritical .

Question = 32

The Question icon should be shown. Constant equivalent: vbQuestion .

Exclamation = 48

The Exclamation icon should be shown. Constant equivalent: vbExclamation .

Information = 64

The Information icon should be shown. Constant equivalent: vbInformation .

Default Button Flags

DefaultButton1 = 0

The first button should be the default button. Constant equivalent: vbDefaultButton1 .

DefaultButton2 = 256

The second button should be the default button. Constant equivalent: vbDefaultButton2 .

DefaultButton3 = 512

The third button should be the default button. Constant equivalent: vbDefaultButton3 .

Message Box Behavior Flags

ApplicationModal = 0

The message box should be application modal. Constant equivalent: vbApplicationModal .

SystemModal = 4096

The message box should be system modal. Constant equivalent: vbSystemModal .

Miscellaneous Flags

MsgBoxHelp = 16384

The message box should have a Help button. Constant equivalent: vbMsgBoxHelp .

MsgBoxRight = 524288

The message box text should be right justified. Constant equivalent: vbMsgBoxRight .

MsgBoxRtlReading = 1048576

The message box text is right-to-left on Hebrew and Arabic systems. Constant equivalent: vbMsgBoxRtlReading .

MsgBoxSetForeground = 65536

The message box should be the foreground window. Constant equivalent: vbSetForeground .

 <  Day Day Up  >  

Категории