I just tried a couple more things. I modified the code as follows:
oForm = CREATEOBJECT("aform")
oForm.Show()
CLEAR EVENTS
DEFINE CLASS aform AS form
windowtype = 1
showwindow = 2
PROCEDURE Activate
READ EVENTS
ENDPROC
PROCEDURE QueryUnload
SET STEP ON
ENDPROC
ENDDEFINE
Then I ran it in development mode. Same result; clicking the close button on the form I created brought up the debugger, clicking the VFP close button displayed "cannot quit Visual Foxpro".
So then I compiled it as an executable and ran it. It appeared along with the default VFP SCREEN form behind it. Clicking the close button on the VFP form again displayed "cannot quit Visual Foxpro", again as expected. Clicking the close button on my form called a "feature not available" message because, I guess, you can't include a call to the Debugger in a executable.
Ken
>Well, in the original test I clicked the "x" on the form I created. However, I just tried clicking the VFP IDE "x" button with the form running in development mode. The message I got was "cannot quit Visual Foxpro", which is what I expected because my program creates an object reference. If there are object references hanging around VFP can't quit.
>
>I also commented out the QueryUnload procedure in the program and tried the same thing, with the same result.
>
>Maybe I don't understand what you mean by "FoxPro". Did you compile this as an executable and run it with SCREEN = ON? Are you trying to close SCREEN?
>
>--Ken
>
>>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement