You may, for error logging purposes want to retrieve the values of all the user defined properties on all your forms. This is particulary useful in error logs as a memory dump will not show this information.
I would like to thank Weedz for telling me about the pemstatus function.
* This retrieves settings for all user generated form properties for all active forms * The settings are stored in arrays that will be picked up by when a memeory dump is done
* Loop through all the (form) objects in the screens form collection for each zoform in _screen.forms
* Each for will have a different array created, this will be the name of the screen zcarrayname='z'+zoform.name
* Create an array that holds all the forms properties = AMEMBERS(zgaproparray, zoform)
* Calculate the array size, by looping through the property array and only including those that are user generated propereties znloop=0 for each zelement in zgaproparray
* Store the property name in single quotes zcpropname="'"+zelement+"'"
* The pemstatus command checks the property on the form to see if its user generated * It requires 3 parameters * 1) The name of form * 2) The name of the property enclosed in quotes * 3) The user generated option (always 4) * EG, pemstatus(testform,'nOrderNo',4) if pemstatus(zoform,&zcpropname,4)=.t. then * Increment the loop counter used to dimension the array with the forms properties and values znloop=znloop+1 endif next zelement
* Create an array that the values can be put into - this will be called the name of the form Public &zcarrayname(znloop,2)
* Store the name and value in an array znloop=1 for each zelement in zgaproparray
if pemstatus(zoform,&zcpropname,4)=.t. then &zcarrayname(znloop,1)=zelement &zcarrayname(znloop,2)=zoform.&zelement znloop=znloop+1 endif
* Release all the variables used to create the arrays of form objects release zgaproparray release znloop release zcarrayname release zelement release zoform release zcpropname