16,554
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim myti As Integer
myti = MsgBox("确定关闭此窗体", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "提示")
Select Case myti
Case MsgBoxResult.Yes
e.Cancel = False
End
Case MsgBoxResult.No
e.Cancel = True
End Select
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim myti As DialogResult = MessageBox.Show("确定关闭此窗体", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk)
Select Case myti
Case Windows.Forms.DialogResult.Yes
e.Cancel = False
Case Windows.Forms.DialogResult.No
e.Cancel = True
End Select
End Sub