Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem closing all forms on shutdown
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00867688
Message ID:
00868170
Views:
23
Darrell, as everybody has told you, this behavior is not normal <s>.

So you have to pare back the problem until you find the case.

Run the program below. Pressing F9 will simulate an "end of program" activity from your menu, where the application does not end, and shutdown should work as normal if you really want to quit. darrell.scx doesn't do anything, it's just marked modal.

You should see the results you want when you shut down or press F9.

Now you have to add in the elements of your program and figure out what's different and causing the issue, a piece at a time. It's probably some member reference, but we won't know until you isolate it.

>L<
ON SHUTDOWN DO EndApp IN darrell WITH .T.
ON KEY LABEL F9 DO EndApp IN darrell

ox = CREATEOBJECT("myform")
ox.SHOW()
READ EVENTS


DEFINE CLASS myform AS FORM
   AutoCenter = .T. 
   ADD OBJECT x AS COMMANDBUTTON

   PROCEDURE x.CLICK
      DO FORM darrell  && a modal form, nothing special in it
   ENDPROC
ENDDEFINE


PROCEDURE EndApp(tQuit)

   FOR i = _SCREEN.FORMCOUNT TO 1 STEP -1
      _SCREEN.FORMS[i].RELEASE
   NEXT

   CLEAR EVENTS
   ON SHUTDOWN
   IF tQuit
      QUIT
   ENDIF

ENDPROC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform