Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Child Form does Clear last changes Why?
Message
De
29/06/2007 00:10:28
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01236413
Message ID:
01236681
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
How are you opening your Form? Could you post the relevant code? I'm guessing that you're creating an instance of your Form and opening it using .ShowDialog(). When the user then closes that Form, it hasn't actually gone away. If you open it again, it will still have the same stuff in it that it had when it was closed (sorry if I get the VB syntax a little wrong, but you should still get the picture):
Dim oForm as MyForm

Me.oForm = new MyForm
Me.oForm.ShowDialog()

' more stuff here, then open again

Me.oForm.ShowDialog()
So, if that's the way you're doing it (or something similar), that's what you'll see. You can get around this by either re-instantiating the Form, or by opening it with .Show() rather than .ShowDialog().

If this is NOT your problem, then post your code so we can figure it out.

~~Bonnie




>Hi All!!
>
>I have a child form that the first time I called the two text boxes came blank. If I close the form and left the text boxes with something and also resize the form and then close. When I call the same form again it has the previous values and also retain the same shape that was the last time I invoked it. I'm using the Me.Close(). Please somebody give me some explanation for that behavior and how to stop it.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform