When I build my application as an EXE and run it, the application comes up and then immediately disappears.
What is wrong?
You need to create an event loop that will hold your application in memory until you leave the application (choosing File | Exit, for example).
The command called READ EVENTS does exactly what you need. You need to put a READ EVENTS into your code, right after the code that sets up the menu and the environment.
Now you need a way to get out of that event loop when you want to leave the application. Visual FoxPro has a CLEAR EVENTS command that will end the event loop. Put a CLEAR EVENTS into the code that tells your app to end (in the menu item File | Exit, for example).