Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Question - Why does this work?
Message
From
02/11/2009 13:07:29
 
 
To
02/11/2009 13:00:29
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01432708
Message ID:
01432736
Views:
46
>Viv
>
>Thanks for the reply.
>
>The callled form was closed by clicking a button on the called form with:
>this.close
>in the click event handler.
>
>Apparently, that doesn't "release" it, it just "hides" it, because I can access its properties from the calling form afer this.close has been executed.
>
>That's really handy in this case, but I'd like to get rid of it and I'm wondering how.

I probably shouldn't be the one answering this since my WinForms is getting rusty. But I think that since the method that calls .ShowDialog is holding a reference to the modal form then it will hang around till that reference goes out of scope.

>
>>>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...
>Hope this helps,
>Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform