在 Visual Studio 2010 中的 Visual Basic 中, 如果这是用来给消息的,
MsgBox("hello", 4, "status")
我如何操作消息框中的结果是或否?
如果用户给出No,这应该发生,如果No,这应该发生。
最佳答案
你需要检查MsgBox
是否返回了vbYes
。
例如:
If vbYes = MsgBox("hello", vbYesNo, "status") Then
'Do things
Else
'Don't do things
End If
https://stackoverflow.com/questions/2983135/