Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

MsgBoxStyle Enumeration

Indicates which buttons to display when calling the MsgBox function.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace: Microsoft.VisualBasic
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)

[FlagsAttribute] 
public enum MsgBoxStyle
/** @attribute FlagsAttribute() */ 
public enum MsgBoxStyle
FlagsAttribute 
public enum MsgBoxStyle
 Member nameDescription
Supported by the .NET Compact FrameworkAbortRetryIgnoreAbort, Retry, and Ignore buttons. This member is equivalent to the Visual Basic constant vbAbortRetryIgnore
Supported by the .NET Compact FrameworkApplicationModalApplication modal message box. This member is equivalent to the Visual Basic constant vbApplicationModal
Supported by the .NET Compact FrameworkCriticalCritical message. This member is equivalent to the Visual Basic constant vbCritical
Supported by the .NET Compact FrameworkDefaultButton1First button is default. This member is equivalent to the Visual Basic constant vbDefaultButton1
Supported by the .NET Compact FrameworkDefaultButton2Second button is default. This member is equivalent to the Visual Basic constant vbDefaultButton2
Supported by the .NET Compact FrameworkDefaultButton3Third button is default. This member is equivalent to the Visual Basic constant vbDefaultButton3
Supported by the .NET Compact FrameworkExclamationWarning message. This member is equivalent to the Visual Basic constant vbExclamation
Supported by the .NET Compact FrameworkInformationInformation message. This member is equivalent to the Visual Basic constant vbInformation
Supported by the .NET Compact FrameworkMsgBoxHelpHelp text. This member is equivalent to the Visual Basic constant vbMsgBoxHelp
Supported by the .NET Compact FrameworkMsgBoxRightRight-aligned text. This member is equivalent to the Visual Basic constant vbMsgBoxRight
Supported by the .NET Compact FrameworkMsgBoxRtlReadingRight-to-left reading text (Hebrew and Arabic systems). This member is equivalent to the Visual Basic constant vbMsgBoxRtlReading
Supported by the .NET Compact FrameworkMsgBoxSetForegroundForeground message box window. This member is equivalent to the Visual Basic constant vbMsgBoxSetForeground
Supported by the .NET Compact FrameworkOkCancel 
Supported by the .NET Compact FrameworkOKCancelOK and Cancel buttons. This member is equivalent to the Visual Basic constant vbOKCancel
Supported by the .NET Compact FrameworkOkOnly 
Supported by the .NET Compact FrameworkOKOnlyOK button only (default). This member is equivalent to the Visual Basic constant vbOKOnly
Supported by the .NET Compact FrameworkQuestionWarning query. This member is equivalent to the Visual Basic constant vbQuestion
Supported by the .NET Compact FrameworkRetryCancelRetry and Cancel buttons. This member is equivalent to the Visual Basic constant vbRetryCancel
Supported by the .NET Compact FrameworkSystemModalSystem modal message box. This member is equivalent to the Visual Basic constant vbSystemModal
Supported by the .NET Compact FrameworkYesNoYes and No buttons. This member is equivalent to the Visual Basic constant vbYesNo
Supported by the .NET Compact FrameworkYesNoCancelYes, No, and Cancel buttons. This member is equivalent to the Visual Basic constant vbYesNoCancel

For more detailed information, see the Visual Basic topic MsgBoxStyle Enumeration.

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.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.