TheLoon


This is the ultimate Foxpro n00b question. Please ignore it if it annoys you.

Trying to get back into Visual Foxpro 6. I figure the best way is to attempt a "Hello World" type program with just a form and a button with no code. I create the project and then create the form. I then added a button with no code. It compiles just fine but when run stand-alone the form appears for a brief second and exits. I know there's a very good reason for this but I've simply forgot. Any clues

Thanks for the clues!  READ EVENT seems to be the key.  I've been forgetting about that whole event driven loop since Foxpro 2.5.  I really appreciate the links and the main.prg explanation. :)




Re: Answered: Trying to make a simple "Hello World" type program..


Re: Answered: Trying to make a simple "Hello World" type program..

Alex Feldstein

You are missing a READ EVENTS. Basixcally what you have to do is create a program (PRG) where you instantiate your environment, forms), main menu then  READ EVENTS:

* main.prg

DO Menu MyMenu

DO FORM MyForm

READ EVENTS

* clean up code here

QUIT

 

Also read the help file for ON SHUTDOWN