Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Properly Disposing Forms in VB.NET 2005
Message
From
11/01/2007 19:44:00
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Properly Disposing Forms in VB.NET 2005
Miscellaneous
Thread ID:
01184855
Message ID:
01184855
Views:
71
Greetings!

I have the following sample code segment involving forms:
Private Sub OpenForm()
   MsgBox(Form2 Is Nothing)
   Form2.ShowDialog()
End
On Form2, I call the Me.Dispose() method in it's FormClosed event.

When I run OpenForm() for the first time, the msgbox displays True, then when I close Form2 and run OpenForm() again, the msgbox will now display False, indicating Form2 is still loaded.

What is the proper way to really unload a Form in VB2005 so that checking if it Is Nothing will generate a True result?

Thanks very much!
Kevin Ü
evolve or die.
Next
Reply
Map
View

Click here to load this message in the networking platform