>I'm intrigued. I ran this as a .prg, clicked the "x" button, and the debugger showed up as expected. No error message. The form doesn't have to be modal; I just did it that way so it would stay visible when run from a .prg. It works if you create the form visually as well.
Which "x" are you clicking? On the form or FoxPro? It works for me on the form but clicking on the FoxPro close gives the error.
-Dave