Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9 forms do not run when called
Message
From
10/02/2011 23:00:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01499597
Message ID:
01499719
Views:
54
>Tore,
>
>Thanks for your response, but I have not used READ EVENTS in an applications since the 2.0 days.
>I wouldn't know where to put one anyhow.
>Since all my other apps do not have that statement, I believe it must be something else.
>If I can be wrong about this, please advise.

It works like this: The main program (main.prg or similar) has three parts:
(1) Any setup instructions for your program
(2) The single command READ EVENTS.
(3) Any cleanup commands that run when the program closes.

The READ EVENTS is the main loop, in the sense that VFP waits for input. If a button is pressed, or a menu command, for example, the corresponding commands are executed - then Visual FoxPro goes right back to READ EVENTS, waiting for more input.

To break out of the READ EVENTS (and end the application), the command CLEAR EVENTS will have to be given somewhere - for example, related to the menu command "File | Quit".

The READ EVENTS is one of the key elements that make it easy to open several forms at once. The other is using private datasessions in forms.

If your application has no READ EVENTS, the common symptoms are that, from the IDE, the Command Window remains accesible, and from an EXE, the program briefly flashes up and immediately closes. However, this should not happen in the case of modal forms.
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