Referencing a form control from the main.prg 
Author Message
 Referencing a form control from the main.prg

I have built an application with the Application Builder
and I would like to change the value of a control on the
one form in the application when it is visible.

How do I reference the form and control from my program?  
or can I?



Tue, 30 Aug 2005 02:22:47 GMT  
 Referencing a form control from the main.prg
Hello, Phil!
You wrote  on Thu, 13 Mar 2003 10:22:47 -0800:

 PL> I have built an application with the Application Builder
 PL> and I would like to change the value of a control on the
 PL> one form in the application when it is visible.

 PL> How do I reference the form and control from my program?
 PL> or can I?

DO FORM yourform NAME formreference
* form/object properties
formreference.label1.caption = "Hello"
* works with methods too
formreference.refresh
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Tue, 30 Aug 2005 02:31:46 GMT  
 Referencing a form control from the main.prg
Eric...

Guess I didn't express myself correctly... The
Application builder created a menu and the File|Open item
does the following command...
APP_GLOBAL.DoNewOpen()

I do not open the form from the program.  The program
only has procedures, but instead of using a public
variable to store data, I would like to just populate
the .Value property from the procedure.

Would the form reference be APP_GLOBAL?

Quote:
>-----Original Message-----
>Hello, Phil!
>You wrote  on Thu, 13 Mar 2003 10:22:47 -0800:

> PL> I have built an application with the Application
Builder
> PL> and I would like to change the value of a control
on the
> PL> one form in the application when it is visible.

> PL> How do I reference the form and control from my
program?
> PL> or can I?

>DO FORM yourform NAME formreference
>* form/object properties
>formreference.label1.caption = "Hello"
>* works with methods too
>formreference.refresh
>---
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts -
Powered By VFP8

>.



Tue, 30 Aug 2005 09:58:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Referencing the controls on a form from another form

2. reference control on one form from another

3. Referencing ALL of the controls in a form

4. making forms to be main screen instead of reside in vfp main window

5. #DEFINE varname only shows up in MAIN.PRG

6. main.prg problem

7. Explain setpath() in tastrade main.prg

8. Adding splash/logon forms after main form ShowWindow prop = 2

9. Main form not unloading when Child forms are open

10. top level forms, child forms, _Screen, the main foxpro window

11. referencing forms from other forms

12. referencing forms and their objects from other forms

 

 
Powered by phpBB® Forum Software