Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Missing Feature In VFP 7.0?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00697186
Message ID:
00697788
Views:
22
I tried your suggestion of using the _VFP.Objects collection.

I opened a form in design mode (MODI FORM) and entered these commands in the command window:

WAIT WINDOW _VFP.OBJECTS(1).NAME

Result: Formset

WAIT WINDOW STR(_VFP.OBJECTS(1).FORMCOUNT)

Result: 1

WAIT WINDOW _VFP.OBJECTS(1).FORMS(1).NAME

Result: Error "Member FORMS does not evalutate to an object."

I expected to get the name of my form "frmMyForm". Then I could create a variable reference to the form object such as:

lo = _VFP.OBJECTS(1).FORMS(1)

I could then manipulate it by code with my form builder while in the design mode. I would not have to manually open it (I use: MODI FORM myForm NOWAIT) or manually select an object on the form in order to traverse the object tree to get to a form reference (using ASELOBJ()).

It seems to me that this feature only was only half-way implemented. Why is there a Formset object with a Formcount property but no Forms() objects/references?

The above code gives the same results in VFP 6.0 SP5, but the following code does work in 6.0 SP5:

WAIT WINDOW _SCREEN.FORMS(1).NAME

Result: frmMyForm

This means that my form bulider will only work in VFP 6.0 SP5 (or maybe SP3). _SCREEN has a Forms property in VFP 7.0 but there are no form objects when I have a form open in design mode, like there were in 6.0 SP5.

I can't remember where I first heard of this trick, but I have used it to create some really useful form builders and I would hate to have to rewrite my form bulders so that I am hacking the SCX. That sounds like a step backward.



>Alan,
>
>>A little mix-up in scope here. This wasn't about me. I was just pointing out to Jim that _VFP has no Forms property.
>
>Sorry for that. I'll repost it to the originator of thread.
>
>Thanks,
>Armin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform