Check out ON SHUTDOWN command in help. A good article which explains this can be found at
http://www.ml-consult.demon.co.uk/foxst-07.htm. When Windows is shutting down, your application can respond by executing cleanup code, clear events and quit specified in you "ON SHUTDOWN" procedure.
HTH
Elmer
>Hi,
>
>I like to know the following issue
>
>01) If my application is running in the front ground.
>02) Any power trip, my UPS (uninterrupted power supply device) will
>sent some signal to all my application to shutdown.
>
>03) How do my VFP application detect that signal and do a normal
>shutdown like other application do ?
>
>04) My UPS vendor don't had any API for me to check the UPS status.
>If other windows application can do it, surely there must be some
>API for it.
>
>Please kindly advise and help. Thank in advance.