Hi Malcom!

Of course you can use "This.Release" to destroy a container but you have to be careful if you call (load) another container at that point.

Let me be more clear. I have a container with a command button. When the user clicks the button the container gets destroyed and then another container comes up. After very long debugging sessions I discovered that this destroys the object but sometimes the screen is n't refreshed as you expect. Screen blocks remain on the screen from the previous container! In the debugger you see that the first container doesn't exist anymore but you can see some unrefreshed pixels.

I solved my problems with a timer control in my form. When I want to destroy a container I send a command in the form's timer control and that's it! - It works great!

Vassilis Aggelakos


----- Original Message ----- From: "Malcolm Greene" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, October 22, 2006 2:16 AM
Subject: Can an container destroy itself?


I have some containers that users can interactively add to a form to
display additional status info.

I would like to users to be able to double click on these containers to
destroy them. I thought that I could have called This.Destroy() in the
container's DblClick() event to have the container destroy itself, but
this does not work.

Suggestions?

Thanks!
Malcolm


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to