Z
Zim Babwe
I have a Windows Application and I want to load another form when the user
clicks a menu item.
I am currently in Form1
When I click on the menu, the code is
Form2.Show
Me.Dispose
------
In Form1 I have the following two routines, but they never get called. I
put a breakpoint on the IF statements, but they never get there. Form2
shows up. How can I make sure that I can call my SaveRegions routine when
leaving?
Thanks for any help
-----------------------------
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) _
Handles Me.FormClosed
If g_SubRegionsModified Then
Call SaveRegions()
g_SubRegionsModified = False
End If
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) _
Handles Me.FormClosing
If g_SubRegionsModified Then
Call SaveRegions()
g_SubRegionsModified = False
End If
End Sub
clicks a menu item.
I am currently in Form1
When I click on the menu, the code is
Form2.Show
Me.Dispose
------
In Form1 I have the following two routines, but they never get called. I
put a breakpoint on the IF statements, but they never get there. Form2
shows up. How can I make sure that I can call my SaveRegions routine when
leaving?
Thanks for any help
-----------------------------
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosedEventArgs) _
Handles Me.FormClosed
If g_SubRegionsModified Then
Call SaveRegions()
g_SubRegionsModified = False
End If
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) _
Handles Me.FormClosing
If g_SubRegionsModified Then
Call SaveRegions()
g_SubRegionsModified = False
End If
End Sub