On shutdown fires when you exit vfp, not when you exit the form. In your
app, if you just close a form, the read events is still in effect, not to
mention the fact that the on shutdown line isn't executed until the events
are cleared. That's why you've got to cancel. The on shutdown, which tells
vfp what to do *if* and *when* it's shut down goes in your setup code, it
doesn't actually shut anything down by itself.
- Lew S
Quote:
> Hi everyone,
> What is wrong with this code. Within the project manager, when I run the
> main.prg I have no problem. After I exit the form, I must cancel the
> program in order to modify or rerun it. When I run the form itself from
> the project manger I do not have this problem.
> DO form topform
> READ events
> ON SHUTDOWN Do cancel
> ON ERROR
> Release ALL EXTENDED
> Clear ALL
> RETURN
> EXIT
> *my cancel program..this file is separate from the main.prg
> ON SHUTDOWN
> thisform.release
> Clear EVENTS
> Clear RESOURCES
> Close ALL
> Clear
> Wait CLEAR
> cancel
> Any ideas?
> Thanks,
> Kerry
> Sent via Deja.com http://www.deja.com/
> Before you buy.