> The much more tricky issue is returning a value from a modeless form. Many
> people will argue that you should never have to do this but I have found it
> useful in certain cases. If you are interested, let me know.
>
> Darrel
As much as I've found in kbprg.hlp (or something like that), the
recommended way is to have a return variable set outside of the form,
run the form, and have some of the form's methods set its value. That's
what M$ said. They suggested having a wrapper class, which should set
the variable, call the form and then return the variable, so it behaves
like a function.
IMO, not much OOP, nor it's elegant - it's just a typical M$ cludge, for
cases they never thought of.
There's another idea for calling a CreateObectED form - it may have some
parameters passed, so these may be passed by ref. Still, those
parameters may be visible to form.init only, and therefore any changes
to them may be lost when form.init exits. Really, is there any solution
to returning value from a form except using Do Form xxx to myvar, for
modal forms. Besides, if a CreateObectED modal form returns value from
its Unload method, where does the value go?