Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need opinion/advice about instantiating forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01070570
Message ID:
01070574
Views:
14
>I'm having trouble understanding when it would be better to instantiate a form using the NEWOBJECT function (assuming the form has been subclassed) rather than DO FORM, or visa versa.
>
>If I create a data entry form that's been saved to a .scx file, and the same form has also been subclassed, what are the benefits/downsides of calling the form using DO DataEntry.scx rather than
>loForm = NEWOBJECT( "DateEntry", "C:\Developement\Myforms.scx" )
>loForm.Visibile = .t.
>
>In what scenarios would I choose one method of the other.
>
>Thanks ahead of time for the advice.

if you will need to access that form from other code then definitely you should go with NewObject() way
The obly thing to remember is to assign reference to public variable or application property that persist all time.
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform