>>How can I get the return value of a form created programatically?
>
>Well, I think the correct theoretical answer would be that you don't treat a class (any class) as if it were a function at all. Something a bit more OOP-like which would solve your problem would probably read like this:
>
>
>LOCAL loForm, lcReturnValue
>
>loForm = CREATEOBJECT("frmModal")
>loForm.Show()
>lcReturnValue = loForm.cReturnValue
>loForm.Release()
>
>
>
>DEFINE CLASS frmModal AS Form
> WindowType = 1
> cReturnValue = ""
>
> PROCEDURE CloseForm
> WITH Thisform
> .cReturnValue = "Hello World"
> .Hide()
> ENDWITH
> ENDPROC
>ENDDEFINE
>
>
>Note that Hide() releases a modal state the same way Release() does. Also, I invariably invoke forms using CREATEOBJECT(), rather than DO FORM.
>
>If you're playing around with this code, please bear with the fact that I'm writing at about 3:30am Central Daylight, and my exact syntax may be a bit fuzzy. :)
Hallelujah! It works like charm. This help me tremendously! Can I give you five stars instead?
A follow-up question but does not really requires an answer as I may soon find this out. Will converting my visual class/forms to text-based format have a significant impact on the total size my EXE?
ramil
~~ learning to stand still