Basically you can't return a value from a class in the traditional sense.
What you can do is instantiate a class (form) and then read one of its
properties before completely destroying it:
oMyDialogBox = CREATEOBJECT('MyCustomDialog')
IF TYPE('oMyDialogBox') == "O"
oMyDialogBox.Show(1) && Modal Show
*-- Then in the Ok or Cancel Button that closes the form
*-- Thisform.Hide()
ENDIF
ReturnValue = oMyDialogBox.MyControl.Value
*-- Having got the quasi-return value the object
*-- can now be destroyed.
oMyDialogBox = .NULL.
Good Luck
Jonathan A. Newell
>I created a form that uses the calendar control in VFP 5.0, and then saved this form as a class. As a form I can say "do form MyCalendar to dMydate" to get the value chosen. Can I get the value chosen if I use frmMyCal =createobject("MyCalendar")? I can't figure out how to use this as a class and get the value the use chose.
>
>Paul
JJ-
One man gathers what another man spills.......