Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem closing all forms on shutdown
Message
 
 
À
19/01/2004 08:32:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00867688
Message ID:
00868170
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform