VB.NET 窗体关闭问题 用的是vs2013
PrivateSubForm1_FormClosed(senderAsObject,eAsFormClosedEventArgs)HandlesMe.FormClosed...
Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
Dim a As Integer
a = MsgBox("确认退出程序", 49, "提示")
If a = MsgBoxResult.Ok Then
End
Else
Exit Sub
End If
End Sub
为什么 点取消还是会关闭窗体 exit sub 不加也一样 帮忙写一个窗体关闭的代码
form1_formcloseing 试过也一样的问题 展开
Dim a As Integer
a = MsgBox("确认退出程序", 49, "提示")
If a = MsgBoxResult.Ok Then
End
Else
Exit Sub
End If
End Sub
为什么 点取消还是会关闭窗体 exit sub 不加也一样 帮忙写一个窗体关闭的代码
form1_formcloseing 试过也一样的问题 展开
3个回答
展开全部
Private Sub Form1_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
Dim a As Integer
a = MsgBox("确认退出程序", 49, "提示")
If a = MsgBoxResult.Ok Then
End
Else
e.cancel=true
End If
End Sub
Dim a As Integer
a = MsgBox("确认退出程序", 49, "提示")
If a = MsgBoxResult.Ok Then
End
Else
e.cancel=true
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把exit sub 那句改成 e.Cancel = True 就行了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询