* Main.prg Set Exclusive Off Set Talk Off Set Multilocks On * other SETs here * call or install your menu here * call your main form if needed: DO Form xx * set up your wait state. The program stays here all the time * responding to user actions. Once a Menu->Exit or Form->Exit is pressed, * it should issue a Clear Events which brings you back * to Main.Prg in the line *after* Read Events for clean up and exit Read Events * clean up code here QuitSee
Read Events
in the help file and see also On Shutdown
which might help.