如何单击窗口右上角的叉来退出系统??
我用下面的不行,只能unload,不能真正的退出系统endPrivate Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim Msg ' 声明变量。
' 设置信息文本。
Msg = "Do you really want to exit the application?"
' 如果用户单击 No 按钮,则停止QueryUnload。
If MsgBox(Msg, vbQuestion + vbYesNo, Me.Caption) = vbNo Then Cancel = True
End Sub
我用下面的不行,只能unload,不能真正的退出系统endPrivate Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim Msg ' 声明变量。
' 设置信息文本。
Msg = "Do you really want to exit the application?"
' 如果用户单击 No 按钮,则停止QueryUnload。
If MsgBox(Msg, vbQuestion + vbYesNo, Me.Caption) = vbNo Then Cancel = True
End Sub
Then Cancel = True
Else
End
End If
-----------