Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run myproject
Message
From
08/05/2005 09:02:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/05/2005 04:27:18
General information
Forum:
Visual FoxPro
Category:
Project manager
Title:
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01011991
Message ID:
01012005
Views:
19
>hi,
>thank you for reply,
>at my program kk(main prg) i insert via click event ---> do form menu1,
>menu1 have 2 forms,
>
>where i must but read events
>thanks.
>m.qasem

Your main program should have the following basic structure:
* Startup commands,
* to prepare everything
...
...

READ EVENTS

* Cleanup commands,
* to run after the user exits
...
...
The READ EVENTS is a "main loop", in the sense that VFP waits for user input, processes clicks, etc., and then goes back to the READ EVENTS to wait for more user input. In other words, a sort of "infinite loop".

Startup commands might include things like SET DELETED ON, showing the main menu, hiding the toolbar, SET HELP TO..., etc.

Most cleanup commands are for the benefit of the programmer, for when you return to the command prompt. For example, restore some VFP toolbars, and SET HELP TO to restore the main VFP help file.

Finally, in your menu command "File | Quit" (or equivalent), you should give the command:
CLEAR EVENTS
This will break out of the READ EVENTS, which otherwise works like an "infinite loop".
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform