>Hi Everybody,
>
>In my forms manager class, I use DO FORM myform NAME somename to manage instances of each of the form my apps uses.
>
>What I am attempting to do now is convert my forms (like frmCustomerDataEntry for example) into a class.
>
>So, instead of:
>
>
> DO FORM frmCustomerDataEntry NAME ofrmCustomerDataEntry
>
>
>I want to:
>
>
>ofrmCustomerDataEntry = CREATEOBJECT( "frmCustomerDataEntry" )
>ofrmCustomerDataEntry.Show()
>
>
>Problem is, it doesn't work quite well. It appears like a ghost then disappears right away if it's Show'n as Modeless. I have to Show it as Modal for it work ( ofrmCustomerDataEntry.Show(1) ). Modal is kinda not the way I would like it.
>
>Obviously, the form object variable loses scope. Declaring the var public wouldn't be 'elegant'.
>
>Any help is appreciated. Or should I just leave it as DO FORM... NAME...?
>
>Thanks! Cheers!
>
>Dennis
Dennis,
How it works differ between the environments (runtime and IDE). In IDE you normally do not have read events while testing code. If you put a read events it'd stay there (as if it is working like "do form myForm name oFrm linked" from a code - not command window which creates the variables as public). In test environments it's fair to declare it as public.
If there is not a special reason for you doing so just leave them as "do form ...". Converting to classes has no serious advantages that I'm aware of.
Cetin