MessageBox with YesNoCancel - No & Cancel triggers same event

前端 未结 9 1098
误落风尘
误落风尘 2020-12-04 21:23

I have a message box with the YesNoCancel buttons...

  • Pressing Yes will do some action and close the application - works fine
9条回答
  •  温柔的废话
    2020-12-04 21:52

    The way I use a yes/no prompt is:

    If MsgBox("Are you sure?", MsgBoxStyle.YesNo) <> MsgBoxResults.Yes Then
        Exit Sub
    End If
    

提交回复
热议问题