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:
00524665
Views:
12
To access the form like an object, you need to launch the form as an object. So, instead of DO FORM MyForm, you will need to do
oForm = newobject( 'MyForm','MyClassLib.vcx' )
oForm.Caption = 'whatever'
oForm.Left = 100
* Show modal
oForm.Show(1) 
release oForm
You need to ensure a couple of conditions are met before you do something like this. One is that the form must be in a VCX (not in a SCX). Second, the form needs to be shown as modal, otherwise, the form will be display but then the control will be return to the calling program and -must likely- you will kill the reference to the form there (and thus the form.)

>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 :)
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform