Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CREATEOBJECT vs DO FORM.. NAME..
Message
 
 
À
14/04/2007 19:59:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01215967
Message ID:
01215972
Vues:
11
You can have an array property in your form manager class and have this array property hold a reference to each open form. When you done with the form, you should set this array element to NULL.

That's an idea, I need to check on Monday at work how do I manage this problem in my form's manager class.

>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
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform