>Little Tip here.
>
>If you create a method on your form that sets and gets certain properties. You can pass the form instead of the parameter. Your Init would look something like this:
>
>LPARAMETER loForm
>IF TYPE("loForm") = "O" && You can use Vartype here if you use VFP 6.0
> lnProperty = loForm.getColor()
> thisform.formref = loForm && Store the form that was passed
>ELSE
> lnProperty = RGB(250,250,250)
>ENDIF
>
>In the end if you want to change the property you can do.
>
>IF TYPE("thisform.formref.name") = "C" && Check if the form still exist
> thisform.formref.setColor(thisform.color)
>ENDIF
>
>This way your form will work on all forms that have a method like that and it will allow you to reuse your original form.
Jeroen,
Good tip. Beware this code is open to potential errors (ie: loForm might be "O" type but .null.). And in addition, instead of couple of methods per property, you could have just one custom generic method that would check if exists property, RO, protected etc and get/set property for any object in form passed.
Cetin