Constants.vbDefaultButton2 字段

定义

指示在显示消息框时将左侧起的第二个按钮作为默认按钮选中。Indicates that the second button from the left is selected as the default button when the message box appears.

public: Microsoft::VisualBasic::MsgBoxStyle vbDefaultButton2 = 256;
public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton2 = 256;
val mutable vbDefaultButton2 : Microsoft.VisualBasic.MsgBoxStyle
Public Const vbDefaultButton2 As MsgBoxStyle  = 256

字段值

MsgBoxStyle

示例

' Set the Retry button as the default button.
MsgBox("Error occurred", vbDefaultButton2 Or vbAbortRetryIgnore)

注解

调用 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.

适用于

另请参阅