W
Wiggum
I have this in the closing event of Form3:
Private Sub Form3__Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
MsgBox("Closing",MsgBoxStyle.OKOnly)
End Sub
PROBLEM: There is no MsgBox showing when I close Form3 by clicking the
X in the upper right and I do not know why.
For some history to this (and potential source of the problem) I have
created the following class to prevent mutiple instances of forms from
opening:
Public Class clsGlobals
#Region "Singleton Forms"
Public Shared Form1 As Form1
Public Shared Form2 As Form2
Public Shared Form3 As Form3
#End Region
End Class
In Form2, for example, I call Form3 as follows:
If clsGlobals.Form3 Is Nothing Then
clsGlobals.Form3 = New Form3
End If
clsGlobals.Form3.Show()
clsGlobals.Form3.Focus()
Can anyone explain what is going on with my closing event and how to
fix it?
Thanks
PB
Private Sub Form3__Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
MsgBox("Closing",MsgBoxStyle.OKOnly)
End Sub
PROBLEM: There is no MsgBox showing when I close Form3 by clicking the
X in the upper right and I do not know why.
For some history to this (and potential source of the problem) I have
created the following class to prevent mutiple instances of forms from
opening:
Public Class clsGlobals
#Region "Singleton Forms"
Public Shared Form1 As Form1
Public Shared Form2 As Form2
Public Shared Form3 As Form3
#End Region
End Class
In Form2, for example, I call Form3 as follows:
If clsGlobals.Form3 Is Nothing Then
clsGlobals.Form3 = New Form3
End If
clsGlobals.Form3.Show()
clsGlobals.Form3.Focus()
Can anyone explain what is going on with my closing event and how to
fix it?
Thanks
PB