16,555
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim message, title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
message = "你是否退出程序执行?"
style = MsgBoxStyle.Question Or MsgBoxStyle.YesNo
title = "msgBox测试"
response = MsgBox(message, style, title)
If response = MsgBoxResult.Yes Then
End
Else
e.Cancel = True
Me.hide()
End If
End Sub