In the form actions closing, I have code to pop-up a dialog box which asks the user if they want to save there work or not or if they want to cancle the closing. How do I tell it to not close when they hit cancle?
Printable View
In the form actions closing, I have code to pop-up a dialog box which asks the user if they want to save there work or not or if they want to cancle the closing. How do I tell it to not close when they hit cancle?
Here is how to handle closing the form event ,
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True End Sub
Thanks alot, works perfectly :)Quote:
Originally posted by Pirate
Here is how to handle closing the form event ,
VB Code:
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing e.Cancel = True End Sub