Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shutting down a FoxPro App
Message
De
05/02/2007 14:26:04
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Shutting down a FoxPro App
Versions des environnements
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01192532
Message ID:
01192532
Vues:
60
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 
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform