>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)