Referencing form properties 
Author Message
 Referencing form properties

From within a button.click() of Form1:

DO FORM form2.scx NAME Form2

How do I reference Form2 properties from within
any method of Form1 while still using DO FORM?

I think something like this was posted before,
but I still haven't got the hang of OOP in VFP. Yet.

TIA



Mon, 28 Jun 1999 03:00:00 GMT  
 Referencing form properties

Hi Buddoi,

You can simply use something like

form2.backcolor = GETCOLOR()

form any method in your form1 to change the backcolor. Likewise you can
change any property or you can refer to any object within that form.

--
 Nagesh
 Aditi Corp.,
( http://www.aditi.com/)        

 --
 Days and years do not mean anything to me. Moments shared
 are frozen in their time frame. Distance or time never fades
 them for me. I cherish them like my life.
 I have never let them sleep alone.   --  Sachi



Mon, 28 Jun 1999 03:00:00 GMT  
 Referencing form properties

Quote:

> From within a button.click() of Form1:

> DO FORM form2.scx NAME Form2

> How do I reference Form2 properties from within
> any method of Form1 while still using DO FORM?

> I think something like this was posted before,
> but I still haven't got the hang of OOP in VFP. Yet.

> TIA

if you use name clause of do form then the form can be referenced by the
name, otherwise the form object will have the reference of the name that
you saved the form as example
create form c:\mydir\myFirstForm
the form can then be referenced as myFirstForm as in
myFirstForm.caption="FoxPro"
Good luck
Allan


Mon, 28 Jun 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. reference form property in a function

2. Can't reference on forms properties from another form

3. Form array properties: passing by reference

4. Cant Reference other Forms Properties

5. Referencing properties on non-active form

6. problem using EVAL() with form property referencing

7. referencing properties in a non-active form

8. Referencing properties from another form

9. ?? Pass property by reference

10. Help with ActiveX control property references

11. Expert help requested -passing class properties to UDFs by reference

12. Referencing Class Properties

 

 
Powered by phpBB® Forum Software