how to close messageBox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
how to close messageBox (and the form wont be closed too) ???
i tried it with close and dispose but then the form is closed too.
thanks
 
Is the MessageBox being shown in a procedure where the form variable is
going out of scope? This shouldn't be happening unless it is or something
wierd is going on behind the scenes. IF you post the code I could probably
be of more help.
 
thanks for the reply
well...i have a module that created a form, and the messageBox is shown in
the closing event
i hope u will be able to help me....
thank you


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
 
Back
Top