From: gentlerobbin on
How can I enable Alt-F4 to close the application but won't dispose its
handle ? Alt-F4 will just act as Close or Ok/Cancel button of the
form

Thanks
From: Jeff Johnson on
<gentlerobbin(a)gmail.com> wrote in message
news:95ca2a01-7dc3-45b1-bcdd-568ac26b95ba(a)r41g2000prr.googlegroups.com...

> How can I enable Alt-F4 to close the application but won't dispose its
> handle ? Alt-F4 will just act as Close or Ok/Cancel button of the
> form

You'd have to trap the WM_SYSCOMMAND message and not allow the system to do
its default handling of that message.