P
Poohface
ok here is what I'm doing at the moment and its no good:
\\
Dim ThisForm as FormWhatever
Private Sub SomeKindOfClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SomeKindOfClick.Click
If ThisForm Is Nothing Then
ThisForm = New FormWhatever
End If
ThisForm.Show()
End Sub
//
Now the 1st time I click, ThisForm comes up and thats great, if I
click again it sees that ThisForm is something and all is well, I only
get one instance of ThisForm. Now, if I close ThisForm it's dispose
method gets called but ThisForm does not turn into a nothing. It's
still a FormWhatever and when we get to the ThisForm.show part I get
and error that I cannot access a disposed object called FormWhatever.
What is the best way to make it so the user can only launch one
instance of a form, but when they close it, they are able to relaunch
one.
Pls & Thx,
Norst
\\
Dim ThisForm as FormWhatever
Private Sub SomeKindOfClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SomeKindOfClick.Click
If ThisForm Is Nothing Then
ThisForm = New FormWhatever
End If
ThisForm.Show()
End Sub
//
Now the 1st time I click, ThisForm comes up and thats great, if I
click again it sees that ThisForm is something and all is well, I only
get one instance of ThisForm. Now, if I close ThisForm it's dispose
method gets called but ThisForm does not turn into a nothing. It's
still a FormWhatever and when we get to the ThisForm.show part I get
and error that I cannot access a disposed object called FormWhatever.
What is the best way to make it so the user can only launch one
instance of a form, but when they close it, they are able to relaunch
one.
Pls & Thx,
Norst