I think you might have SET ESCAPE ON.
>Hello Foxperts,
>
>It is possible to close a print preview with the escape key.
>
>However, my application is exiting/terminating when users do so. I've tried to capture the situation with a KEYBOARD(255) and =INKEY(), but with no success. The app still closes and returns to the command window in the development environment and exits back to the desktop in the exe.
>
>What should I be watching for in the debugger to help me find the culprit?
>
>Thanks,
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)