How can I catch the event that closes the application by clicking on the Close icon in the top right corner ? I've tryied to catch the M_EXIT in the cmd window but it doesn't work. If I have an exit option that generates the M_EXIT event then fine (if I use that option form the menu) but not by 'Alt-F4' or the icon. Thanks Przemek -- Przemyslaw G. Gawronski ICQ:8358522 mailto:gawronskip@usa.net