Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between forms and class based forms?
Message
 
 
To
24/03/2009 18:03:18
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01391221
Message ID:
01391227
Views:
190
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform