
Changing one form's properties from a different form
Quote:
> I'm running form2 from form1. When in form2, I need to change one of
> the properties on the calling form (form1). Can someone explain how to do
> this?
Here is one method :
add a property ioCallingForm to your form's base class
when calling Form2 from form1 :
DO FORM form2 WITH this && passing a reference to the calling form
In form2 init :
LPARAMETERS toCallingForm
this.ioCallingForm = toCallingForm && storing reference to the calling form in
a property of the called form
now you can read/set any property of the calling form, or run any of its
method from anywhere in your called form :
this.ioCallingForm.MyProperty = MyValue
this.ioCallingForm.myMethod()
another method consists in using a forms manager object, which holds
references to all active forms
Christian Desbourse (Belgium)