我有一个消息框,当我按下一个基本上说“你确定要退出”的关闭按钮时会弹出一个消息框,但是当我单击否按钮或取消但程序以任何方式关闭时
这是我的代码:
'Close Button
Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
Dim result = MessageBox.Show(" Are you sure you want to quit", "Are you sure?", MessageBoxButtons.YesNoCancel)
Me.Close()
End Sub