Disabling Alt-F4 Close Behavior
Posted on 1998-11-17
I'm writing an application which will be displayed in a kiosk. I've successfully disabled almost everything that could potentially close the app, except for the ALT-F4 Close combination.
Can someone tell me how to disable ALT-F4?
Things I've tried:
// Turn System Keys (like windows, alt-tab, etc) off
SystemParametersInfo (SPI_SCREENSAVERRUNNING, 1, &nOldVal, 0);
Very handy for turning off Windows Menu, CTRL-ALT-DEL, etc, but not ALT-F4!
2) Create a key accelerator for ALT-F4 and map it to an empty method. This didn't work.
3) Try catching WM_SYSKEYDOWN message in PreTranslateMessage. It seemed that the app closes before that method is called.
Thanks for your help,