Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shutting down a FoxPro App
Message
 
À
05/02/2007 14:26:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01192532
Message ID:
01193173
Vues:
11
Brian,

I vaguely remember some issue to do with QUITing in forms Destroy event that was fixed in SP1 (vfp9). Have you got the service pack?



>Below are two versions of the same simple program that exhibit different behavior upon windows shutdown / logoff. As far as I can tell, in both versions, QUIT is at the end of the program, and both should behave identically. Any idea of what might be going on?
>
>Thanks,
>Brian Vander Plaats
>Vogel Paint, Inc.
>
>
>* Version 1 - Shuts down properly on logoff/shutdown
>loForm = CREATEOBJECT('myForm')
>loForm.Show()
>
>lcCommand = "ShutdownProgram()"
>ON SHUTDOWN &lcCommand
>
>READ EVENTS
>
>DEFINE CLASS myForm as Form
>
>ShowWindow = 2
>
>	PROCEDURE Destroy
>		DO ShutdownProgram
>	ENDPROC
>
>ENDDEFINE
>
>PROCEDURE ShutdownProgram
>	ON SHUTDOWN
>	Clear Events
>	QUIT && IN SHUTDOWN ROUTINE
>ENDPROC
>
>
>
>
>* Version 2 - Program closes on loggoff/shutdown, but the Windows logoff does not finish
>loForm = CREATEOBJECT('myForm')
>loForm.Show()
>
>lcCommand = "ShutdownProgram()"
>ON SHUTDOWN &lcCommand
>
>READ EVENTS
>QUIT && IN MAIN ROUTINE
>
>DEFINE CLASS myForm as Form
>
>ShowWindow = 2
>
>	PROCEDURE Destroy
>		DO ShutdownProgram
>	ENDPROC
>
>ENDDEFINE
>
>PROCEDURE ShutdownProgram
>	ON SHUTDOWN
>	Clear Events
>		
>ENDPROC
>
Mathias Banda

Time is longer than a rope.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform