Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing Forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00524602
Message ID:
00524651
Views:
12
>Oh yea, btw, I know I could do _SCREEN.FORM(X).Control.Property, but I'd rather directly address the form instead.
>
>>Ok, I'm sure I'm being completely daft here, but I've got what should be a simple problem. I want to control a Form from a PRG (alter captions, values, change colors, etc). But how?
>>
>>I tried FormName.Controlname.PropertyName=Value, and _Screen.Formname.etc doesn't work either. I read something about a FormSet (multiple forms in one SCT, which you can then reference: FormSet.Form.Control.Property=Value), but that isn't an option in the project I'm working on.
>>
>>I'm certain that there is a simple, slap me upside the head, easy answer to this, but heck if I know it :)

You can iterate through the _SCREEN.Forms collection to find the form you want.

ie.
FOR Each Form IN _SCREEN.FORMS
  IF Form.Name = <Name of form you're looking for>
    ...
  ENDIF
ENDFOR
If you know the form you want is the active form...
_SCREEN.ACTIVEFORM
Brien R. Givens

Brampwood Systems
Previous
Reply
Map
View

Click here to load this message in the networking platform