I want to stop a MDI form from closing unless certain criteria is set. I also want to prevent a form from closing if Ctrl-F4 is pressed. I know I can stop this two ways, either writing code on the onCloseQuery or setting the Crtl-F4 key press to zero. My problem is, 1) after setting the criteria in the onCloseQuery - what is the code that actually STOPS the form from closing and 2) how do you set CTRL-F4 to zero? I'm hoping writing code in the onCloseQuery stops a CTRL-F4 key press, but if it doesn't, I need answers to both questions.