Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form
Message
De
08/04/2004 19:01:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/04/2004 01:59:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Form
Divers
Thread ID:
00892844
Message ID:
00893437
Vues:
15
>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:
* startup code
set deleted on
set ...
...

do mainmenu.mpr

READ EVENTS

* cleanup code
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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform