Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Properly Disposing Forms in VB.NET 2005
Message
De
11/01/2007 19:44:00
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Properly Disposing Forms in VB.NET 2005
Divers
Thread ID:
01184855
Message ID:
01184855
Vues:
73
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform