Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON SHUTDOWN procedure not working
Message
From
28/10/1998 17:11:39
 
 
To
28/10/1998 15:28:43
Donny Sims
Independent Computer Consultants Inc
Scottsboro, Alabama, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00151892
Message ID:
00151969
Views:
17
>Someone please tell me what I'm doing wrong, I think this should be all the meaningful parts:
>
>
>SELE 0
>USE UserInfo
>
>ON SHUTDOWN DO MyShutdown
>
>DO FORM MyMenu
>
>READ EVENTS
>
>CLEAR ALL
>CLOSE ALL
>QUIT
>
>DEFINE CLASS MyTimer AS Timer
>	Interval = 3000
>	PROCEDURE Timer
>          KEYBOARD '{ENTER}'
>	ENDPROC
>ENDDEFINE
>
>PROCEDURE MyShutdown
>CLEAR ALL
>CLOSE ALL
>QUIT
>ENDPROC
>
>
>
>Exiting with CLEAR EVENTS and ThisForm.Release from the MyMenu form works fine but if the X button on the form is selected the MyShutdown procedure *does not* run leaving the UserInfo file open so I have to reboot the computer to close it. I put in ON SHUTDOWN MESSAGEBOX('SHUTDOWN') and the Messagebox fired so I know the event handler is working (of course I had to reboot then to close the app). I'm working with VFP 5.0a on this.
>
>TIA

Try adding a CLEAR EVENTS before the CLEAR ALL statement.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform