MsgBoxResult 枚举

定义

指示在消息框上按下了哪个按钮,由 MsgBox 函数返回。Indicates which button was pressed on a message box, returned by the MsgBox function.

public enum class MsgBoxResult
public enum MsgBoxResult
type MsgBoxResult = 
Public Enum MsgBoxResult
继承
MsgBoxResult

字段

Abort 3

按下了“中止”按钮。Abort button was pressed. 此成员等效于 Visual Basic 常量 vbAbortThis member is equivalent to the Visual Basic constant vbAbort.

Cancel 2

按下了“取消”按钮。Cancel button was pressed. 此成员等效于 Visual Basic 常量 vbCancelThis member is equivalent to the Visual Basic constant vbCancel.

Ignore 5

按下了“忽略”按钮。Ignore button was pressed. 此成员等效于 Visual Basic 常量 vbIgnoreThis member is equivalent to the Visual Basic constant vbIgnore.

No 7

按下了“否”按钮。No button was pressed. 此成员等效于 Visual Basic 常量 vbNoThis member is equivalent to the Visual Basic constant vbNo.

Ok 1

按下了“确定”按钮。OK button was pressed. 此成员等效于 Visual Basic 常量 vbOKThis member is equivalent to the Visual Basic constant vbOK.

OK 1
Retry 4

按下了“重试”按钮。Retry button was pressed. 此成员等效于 Visual Basic 常量 vbRetryThis member is equivalent to the Visual Basic constant vbRetry.

Yes 6

按下了“是”按钮。Yes button was pressed. 此成员等效于 Visual Basic 常量 vbYesThis member is equivalent to the Visual Basic constant vbYes.

注解

调用MsgBox函数时, 可以在代码中MsgBoxResult使用枚举来替换实际值。When you call the MsgBox function, you can use the MsgBoxResult enumeration in your code in place of the actual values.

MsgBox 函数MsgBoxResult返回枚举值。The MsgBox function returns a MsgBoxResult enumeration value.

适用于

另请参阅