Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between forms and class based forms?
Message
 
 
À
24/03/2009 18:03:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01391221
Message ID:
01391227
Vues:
191
Mostly it's a personal preference to use a form or a class based form. There're also some differences between them.
For example, from VFP help:

On an .scx form, if you add instantiation code to the member class's Init event, Visual FoxPro disregards that code and only the Init code for the member class definition runs. However, with visual class library (.vcx) forms, Visual FoxPro creates a true subclass. You can safely add instantiation code for other events such as Click.


>What's the functional difference between a form and a class based form?
>
>I have seen code like the following enough times to wonder: Why not Do Form ???
>
release _oAnchorEditor
>public _oAnchorEditor
>_oAnchorEditor = newobject('AnchorEditor', 'AnchorEditor.vcx')
>if vartype(_oAnchorEditor) = 'O'
>	_oAnchorEditor.Show()
>else
>	release _oAnchorEditor
>endif vartype(_oAnchorEditor) = 'O'
>
>Thanks
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform