Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Question - Why does this work?
Message
From
02/11/2009 12:33:10
 
 
To
02/11/2009 10:25:43
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01432708
Message ID:
01432724
Views:
68
>
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform