in reply to Re: Catching WINDOW close event and take actionsin thread Catching WINDOW close event and take actions