I don't believe destroying the window will regain the memory, so a simple Hide() may suffice. Generally what I'll do when I want to permanently get rid of it, though, is to localize the building of that window and all associated $vars within a subroutine. Then, Hide() the window before you return. That should have the same general effect, I think.
-----Original Message----- From: Stuart Arnold [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 22, 2003 5:07 PM To: 'Maksim Golunov'; 'Cruickshanks, Darin'; perl-win32-gui-users@lists.sourceforge.net Subject: RE: [perl-win32-gui-users] Silly question I haven't tried it but you may be able to do a plain "SendMessage( WM_DESTROY...)" to the Child window. I believe you'll need to used the windows "-handle" property or GetWindow() func to do it. I'll take a look tinite on it. Lemme know if it works or not. -stuart -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maksim Golunov Sent: Tuesday, April 22, 2003 4:56 PM To: 'Cruickshanks, Darin'; perl-win32-gui-users@lists.sourceforge.net Subject: RE: [perl-win32-gui-users] Silly question I faced the problem as well. Even looked at MFC implementation of DoModal(). Eventually, I haven't found nothing better that calling $window->Hide() for child windows. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cruickshanks, Darin Sent: Tuesday, April 22, 2003 5:10 PM To: perl-win32-gui-users@lists.sourceforge.net Subject: [perl-win32-gui-users] Silly question This seems like it will have an obvious answer but I really cant see it in the documentation?!? How do you 'kill off' any child windows that may have been created? Cheers, Darin -------------------------------------------- Darin Cruickshanks Labs Manager, Computing Service University of Essex [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 01206 873585