Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie Question - Why does this work?
Message
De
02/11/2009 12:33:10
 
 
À
02/11/2009 10:25:43
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
01432708
Message ID:
01432724
Vues:
70
>
>GetHolderForm myGetHolderForm = new GetHolderForm();
> myGetHolderForm.IntHolderID = intParentHolderID
>  myGetHolderForm.ShowDialog();
>  MessageBox.Show(myGetHolderForm.HolderName,"holder name");
>
>
>IntHolderID and HolderName are properties on the called form.
>
>The problem is to pass the inParentHolderID integer to the called form, have the called form do some things with the user and set the HolderName property and then be able to access the HolderName property on the called form from the calling form after the modal called form has been closed.
>
>I found some good ideas for passing data between forms on the web and this one looked simplest, so I tried it and it worked.
>
>This works, but it wouldn't in VFP, because the called form object would have disappeared when it was released.
>
>The newbie question is .. why does this work? or put another way when does the called form object disappear in C#?

When myGetHolderForm goes out of scope or you specifically close it. .ShowDialog basically just shows the form as Modal...
HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform