在Visual Basic 2012中,当我为任何动作添加Msgbox时,Msgbox显示两次
我的Msgbox代码
Dim msg1
msg1 = MsgBox("Form2.show",MsgBoxStyle.Information Or MsgBoxStyle.YesNo,"Form2")
If msg1 = vbYes Then Form2.Show()
else
end if
答案 0 :(得分:0)
Dim msg1
msg1 = MsgBox("Form2.show", MsgBoxStyle.Information Or MsgBoxStyle.YesNo, "Form2")
If msg1 = vbYes Then
Me.Show()
ElseIf msg1 = vbNo Then
Me.Close() 'put here what you want to do
End If
End Sub