TheWizardofInt
Well-known member
Normally, I will instantiate a class for global variables with a section like so:
Then invoke the class:
Dim glob as globVars
glob = globVars.GetInstance
And start using variables.
This works over a network environment, but not so hot in an Internet environment, I believe because the Application doesnt really close if everyone is on it.
I tried setting the class to nothing in the Application.Close event - no luck.
Any ideas as to what I am doing or not doing wrong here?
Code:
Private m_FullName As String
Private m_Identity As System.Security.Principal.WindowsIdentity
Private m_URL As String
Shared myInstance As globVars
Private Sub New()
m_Identity = System.Security.Principal.WindowsIdentity.GetCurrent()
m_FullName = m_Identity.Name
End Sub
Public Shared Function GetInstance() As globVars
If myInstance Is Nothing Then
myInstance = New globVars
End If
Return myInstance
End Function
/ insert properties here
Then invoke the class:
Dim glob as globVars
glob = globVars.GetInstance
And start using variables.
This works over a network environment, but not so hot in an Internet environment, I believe because the Application doesnt really close if everyone is on it.
I tried setting the class to nothing in the Application.Close event - no luck.
Any ideas as to what I am doing or not doing wrong here?