Question:
With an application compiled into an EXE, why when I select 1 topic, enter into it, and exit do I get booted out of FoxPro to the main Windows screen?
Answer:
You need to create an event loop, a loop that holds VFP in memory until it is time to allow the application to end. VFP has two commands that make this very simple: READ EVENTS and CLEAR EVENTS.
At the point in your application when you are ready to accept user input (everything is ready to go), issue a READ EVENTS command:
*-- my main programDO FORM myformREAD EVENTS
Then, in the button or menu option that closes the application, issue a CLEAR EVENTS command.