G
Guest
hi,
i have a module that created a form, and the messageBox is shown in
the closing event , but when the im choosing the "cancel" button in the
messageBox the messageBox and also the form is getting closed
i want the messageBox to close (without the form )?
how to close only the messageBox?
thanks in advanced
Private Sub teacher_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Select Case MessageBox.Show("Do you want to save changes?", " ",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button1)
Case DialogResult.Cancel
Case DialogResult.No
Me.Dispose()
Case DialogResult.Yes
saveAll()
End Select
End Sub
i have a module that created a form, and the messageBox is shown in
the closing event , but when the im choosing the "cancel" button in the
messageBox the messageBox and also the form is getting closed
i want the messageBox to close (without the form )?
how to close only the messageBox?
thanks in advanced
Private Sub teacher_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Select Case MessageBox.Show("Do you want to save changes?", " ",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button1)
Case DialogResult.Cancel
Case DialogResult.No
Me.Dispose()
Case DialogResult.Yes
saveAll()
End Select
End Sub