>I Got two question
>1 - When i passe a parameter with Do form command
> How can i make my parameter visible in the receving form with out defining a Public variable and asing the parameter value to the public variable
>
You have to save it as a form property, since the value goes out of scope immediately after the Init completes.
>2 - Can we passe array to a form. With the Do form command
Yes -m by default, all parameters passed by DO are by reference, so that if you have an array aMyArray[], you can pass it to the form's Init by:
DO FORM MyForm WITH aMyArray
In the Init, you'll need a PARAMETER or LPARAMETER statement, and in order to avoid a warning at compile time, an EXTERNAL ARRAY statement. Your Init code might start something like:
LPARAMETER taInArray
EXTERNAL ARRAY taInArray
You can then copy the passed array to a member array property. You can get the dimensions of the passed array using ALEN(). Again, you have to save it to a Form member array, because the parameter or lparameter will go out of scope as soon as the Init method completes.
A better way to pass arrays (or really anything) by reference is to create a parameter object - an object that contains the things you want passed in or out of the form. You save the object reference to a member property, and then anywhere within the form, you can references the members of the passed object through the form property holding the object reference. If you need to change the values in the array and pass them back from the form, simply modify the content of the object; on exit from the form, the object reference still exists, and any changes are then available to the calling routine.