>hi,
>
>i don't understand ,where i can put (read event and clear event)
>
>if you have e.i
The READ EVENTS goes into the main program:
set deleted on
set ...
...
do mainmenu.mpr
READ EVENTS
close database
set sysmenu to default
...
Everything you write before READ EVENTS will execute before the user can select an option. Then, the program will wait at READ EVENTS, until the user clicks somewhere. For instance, the user opens a form (from a menu command), VFP opens the form, and then goes back to READ EVENTS (waiting for further user input). If the user clicks on a button, VFP runs the button's Click() Event, and then goes back to READ EVENTS. This is like an infinite loop.
A CLEAR EVENTS will finish this infinite loop, and VFP will start running the cleanup code. Here, you put any code you want to run to clean things up. For instance, you could reset the menu, reset the toolbars, save user preferences to tables or to the registry, etc. - depending on the desired complexity of your system.
I would put the CLEAR EVENTS command into your main menu, for the "File | Quit" menu item.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)