On my mnuAbout click event I have the following.
Dim fAbout as New frmAbout
fAbout.Show
if the user keeps clicking mnuabout it will keep loading new forms. How do I prevent more than just one?
Printable View
On my mnuAbout click event I have the following.
Dim fAbout as New frmAbout
fAbout.Show
if the user keeps clicking mnuabout it will keep loading new forms. How do I prevent more than just one?
VB Code:
Private fAbout As frmAbout 'Declare at form level Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If fAbout Is Nothing Then fAbout = New frmAbout fAbout.Show() End If End Sub
Hmmm that sorta works but now how to make fabout = nothing when the form is closed?