如何从消息框中获取结果? [英] How do I take the result from a message box?
本文介绍了如何从消息框中获取结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Visual Studio 2010 中的 Visual Basic 中,如果这用于发消息,
In Visual Basic in Visual Studio 2010, if this is used for giving a message,
MsgBox("hello", 4, "status")
如何操作来自 msgbox 的结果 Yes 或 No?
how do I manipulate the result Yes or No from the msgbox?
如果用户给出No,就会发生这种情况,如果No,就会发生这种情况.
Like this should happen if the user gives No and this should happen if No.
推荐答案
需要检查MsgBox
是否返回vbYes
.
例如:
If vbYes = MsgBox("hello", vbYesNo, "status") Then
'Do things
Else
'Don't do things
End If
这篇关于如何从消息框中获取结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文