Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shutting down a FoxPro App
Message
From
05/02/2007 14:26:04
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Shutting down a FoxPro App
Environment versions
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01192532
Message ID:
01192532
Views:
61
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 
Next
Reply
Map
View

Click here to load this message in the networking platform