I am just starting with Visual Foxpro. I have been a long time CLIPPER developer and trying to switch to VFP to convert my applications from DOS environment to Windows plateform. I started off with a very simple application with one single form containing 4 variables, 4 labels, 4 text boxes and 2 buttons. I set ShowWindow property of the Form to "2 - AS TOP LEVEL FORM". I put the following code in Init and Activate methods of the form
Init
thisform.addproperty('ReadEventsFlg',.F.
cInfile='KKKKKKKK
cOutfile='LLLLLLLL
dStart=ctod('01/01/2000'
dEnd=date(
Activate
IF !THISFORM.READEVENTSFL
READ EVENT
THISFORM.READEVENTSFLG=.T
ENDI
In CONFIG.FPW, I put only one line SCREEN=OFF. The button named GO displays a messagebox showing values of the variables as entered by the user and CANCEL button has following code in CLICK_EVENT
clear event
thisform.releas
When I run the form in Design environment, everything works fine i.e. the initial values of the variables are displayed as initialized in the Init method. However, when I compile an EXE and run it under runtime, it shows all blank values. I tried moving the initialization code of the variables from Init to Activate method. Then it shows the correct value for the first text box and as I click on other boxes, those values also show up correctly. I want the form to show all four values correctly as the form is first displayed. I have playing with it for 3 days now but with no success
I would really appreciate help from the experts and make my entry into FOXPRO world a little easier
Thanks in advance.....