Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event syntax
Message
 
To
02/02/2005 14:46:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00983157
Message ID:
00983199
Views:
29
I have done exactly that, error persists on "loForm = laForm(1)"
laform.prg does not exist"


>Create a form called "testform" and slap three textboxes on it. Then save it. With the form closed,
>copy this to a prg and with the program open, just click on the run button. It opens the form up to be modified and makes the changes. The changes are not saved until you save the form manually.
>
>Works for me everytime.
>
>>I see what your code does. But when this is executed, error pops up "source is out of date" and "laform.prg does not exist"
>>>Here is how I do it:
>>>
>>>*--Form in this example is testform.scx
>>>MODIFY FORM testform NOWAIT
>>>
>>>ASELOBJ(laform, 1)
>>>loform = laform(1)
>>>*--See if controls are on a page on a pageframe named "pageframe"
>>>IF TYPE('loform.pageframe')<>"U"
>>>   FOR EACH lopage IN loform.PAGEFRAME.PAGES
>>>      FOR EACH ocontrol IN lopage.CONTROLS
>>>         *--Change the height, width, and valid
>>>         IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX"
>>>            ocontrol.HEIGHT = 25
>>>            ocontrol.WIDTH = 64
>>>            lc_addline = "*--Valid Method"+CHR(13)
>>>            lc_value = ocontrol.READMETHOD('Valid')
>>>            ocontrol.WRITEMETHOD('Valid',lc_addline+lc_value+CHR(13))
>>>         ENDIF
>>>      ENDFOR
>>>   ENDFOR
>>>ELSE	&& no pageframe all controls are on the single page
>>>   FOR EACH ocontrol IN loform.CONTROLS
>>>      *--Change the height, width, and valid
>>>      IF ALLTRIM(UPPER(ocontrol.BASECLASS)) = "TEXTBOX"
>>>         ocontrol.HEIGHT = 25
>>>         ocontrol.WIDTH = 64
>>>         lc_addline = "*--Valid Method"+CHR(13)
>>>         lc_value = ocontrol.READMETHOD('Valid')
>>>         ocontrol.WRITEMETHOD('Valid',lc_addline+lc_value+CHR(13))
>>>      ENDIF
>>>   ENDFOR
>>>ENDIF
>>>
>>>RETURN
>>>
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform