G
Guest
Hi you al
I am new to this stuff and I found this code to close a form in the help files and I do not understand it or where its goe
' Calls this method from the InitializeComponent() method of your form
Private Sub OtherInitialize(
AddHandler Me.Closing, AddressOf Me.Form1_Cance
End Sub 'OtherInitializ
Protected Sub Form1_Cancel(sender As Object, e As CancelEventArgs
If Not myDataIsSaved The
e.Cancel = Tru
MessageBox.Show("You must save first."
Els
e.Cancel = Fals
MessageBox.Show("Goodbye."
End I
End Sub 'Form1_Cance
Forget about the myDataIsSaved stuff. I am trying to know where in the form to put the "Sub OtherInitialize". where ito call it from and to put the "Protected Sub Form1_Cancel
Thank
I am new to this stuff and I found this code to close a form in the help files and I do not understand it or where its goe
' Calls this method from the InitializeComponent() method of your form
Private Sub OtherInitialize(
AddHandler Me.Closing, AddressOf Me.Form1_Cance
End Sub 'OtherInitializ
Protected Sub Form1_Cancel(sender As Object, e As CancelEventArgs
If Not myDataIsSaved The
e.Cancel = Tru
MessageBox.Show("You must save first."
Els
e.Cancel = Fals
MessageBox.Show("Goodbye."
End I
End Sub 'Form1_Cance
Forget about the myDataIsSaved stuff. I am trying to know where in the form to put the "Sub OtherInitialize". where ito call it from and to put the "Protected Sub Form1_Cancel
Thank