Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Child Form does Clear last changes Why?
Message
De
29/06/2007 11:54:43
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01236413
Message ID:
01236822
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Gregorio,

No, that's not re-instantiating the form, that's simply showing the same form again (you've instantiated it elsewhere). You'd need to do this:
Private Sub Add_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add_btn.Click

        DepartmentADD = new MyForm
        DepartmentADD.ShowDialog()

    End Sub
~~Bonnie



>Bonnie:
>
>You are absolutely right. But the reason I used ShowDialog if because I dont want the form to open and the code that I have after that being executed. What I need from you is tell me how I kill that form that the next time I call the form does not retain the previous values and the size changed. Without changed the line to .show().
>Here is the code,
>
>
>Private Sub Add_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add_btn.Click
>        DepartmentADD.ShowDialog()
>
>    End Sub
>
>Something that you need to explain, "You can get around this by either re-instantiating the Form" I call that method everytime I press the add button. That's not the same as re-instantiating the form?
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform