Now I feel like an idiot. Since this is my first experience in VB
..NET, I can't even seem to open another form when you click on a
button.
I have a form frmStartup and a button, btnStart. When they tap on the
button, I want the form frmLogin to open using the singleton instance,
but I get nowhere. Can you provide this newbie an example.
On Wed, 23 Feb 2005 20:42:37 -0500, "Tim Wilson"
[quoted text, click to view] <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote:
>
http://www.dofactory.com/Patterns/PatternSingleton.aspx >
>Public Class Singleton
>
> ' Fields
> Private Shared internalInstance As Singleton
>
> ' Constructor
> Protected Sub New()
> End Sub
>
> ' Methods
> Public Shared Function Instance() As Singleton
> ' Uses "Lazy initialization"
> If (internalInstance Is Nothing) Then
> internalInstance = New Singleton
> End If
> Return internalInstance
> End Function
>
>End Class
>
>[Usage]
>Dim s1 As Singleton = Singleton.Instance()
http://www.dofactory.com/Patterns/PatternSingleton.aspx Public Class Singleton
' Fields
Private Shared internalInstance As Singleton
' Constructor
Protected Sub New()
End Sub
' Methods
Public Shared Function Instance() As Singleton
' Uses "Lazy initialization"
If (internalInstance Is Nothing) Then
internalInstance = New Singleton
End If
Return internalInstance
End Function
End Class
[Usage]
Dim s1 As Singleton = Singleton.Instance()
--
Tim Wilson
..Net Compact Framework MVP
[quoted text, click to view] "Aaron" <ABieberitz@charter.net> wrote in message
news:116q11lndfs9b3mrlocp8ktcnovp8mp0j8@4ax.com...
> Is the singleton method possible in Compact Framework VB .NET? If so,
> can anyone tell me how to set it up? I've looked all over the web and
> have found VB .NET examples, but they're all convoluted and don't
> work. I had a real simple one working in C#, but I don't know how to
> accurately translate it. Any help would be appreciated.
>
> Thanks