Hi David,
I have a form class in a .vcx file. I have "return this.form_property_name" in the unload event.
I tried using "do form form_name to x1" as you show below, but it doesn't seem to work with forms in .vcx files.
I can start the form with:
oform1 = Createobject("form")
result = oform1.show()
However the value of result is .T., not the value I wanted returned.
I'm probably missing something simple. How do I get the returned value?
Thanks for your help.
Paul de Niverville
>Michael,
>
>
>David, so your saying in the UNLOAD event I should be able to return 'something' from the form class unload event. I tried to return anything but only a logical true was passed back.>
>Yes, you can return this.SomeFormProperty in the Unload event.
>
>I just created a form, dropped a textbox on it, bound the textbox to thisform.Tag.
>
>do form modal1 to x1
>? x1 && prints out whatever was typed in the textbox
>
>Here's the classbrowser output for the form:
>
>
PUBLIC oform1
>
>oform1=CREATEOBJECT("form1")
>oform1.Show
>RETURN
>
>**************************************************
>*-- Form: form1 (e:\vfp5app\misc\modal1.scx)
>*-- ParentClass: form
>*-- BaseClass: form
>*
>DEFINE CLASS form1 AS form
> DoCreate = .T.
> Caption = "Form1"
> WindowType = 1
> Name = "Form1"
>
> ADD OBJECT text1 AS textbox WITH ;
> ControlSource = "thisform.tag", ;
> Left = 34, ;
> Top = 24, ;
> Width = 297, ;
> Name = "Text1"
>
> PROCEDURE Unload
> return this.Tag
> ENDPROC
>ENDDEFINE