loMethod = CREATEOBJECT("Empty") ADDPROPERTY(loMethod,"StringVal","") ADDPROPERTY(loMethod,"IntVal",0) llReturnOK = .F. DO FORM MyForm WITH loMethod TO llReturnOK IF llReturnOK ** Process the return values in the loMethod object properties ENDIFThen in the INIT method of the form (I define a custom property "oReturn" in the form):
LPARAMETERS poReturn thisform.oReturn = poReturn ...Now the called form can store values in the object:
thisform.oReturn.StringVal = "Return string" thisform.oReturn.IntVal = 9I still use the RETURN in the UNLOAD event to return whether the user entered data or cancelled:
RETURN thisform.UserEntryI create UserEntry as a custom property and initialize to .F. -- then in the "Save" click event method, I set the values as appropriate and save .T. to thisform.UserEntry. This gives the calling program notification of user entered data or whether they cancelled.