更新时间:2023-12-02 09:51:34
Try settingCancel = True
in theClosing
event to prevent the form from unloading.
Hi! I have the solution of this Problem
Use This Code :Private Sub FrmMDI_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Dim Flag As Integer Flag = (MsgBox("Are you sure you want to exit ? ", vbInformation + vbOKCancel, "Exit")) If Flag = 2 Then e.Cancel = 1 End End Sub
And Your Problem is Solved.
Thank you. :)