I'm new with Foxpro, could somebody tell me what is the different between CREATEOBJECT and NEWOBJECT ?
And when should I use CREATEOBJECT or NEWOBJECT ?
Createobject is used by a more generic way. It could be used the same way as a NEWOBJECT with a few differences:
- Createobject, when creating VFP object from custom class, requires that the custom class library/PRG is loaded in the memory by SEL CLASSLIB/ SET PROCEDURE commands. Nowobject has a parameter that specifies the class module, so it is not required to be loaded. In addition, NewObject can specify the application (APP or EXE) that contains that class definition.
- NewObject, when called as a method of the cntainer object (for example, form.NewObject(...) ), can add a VFP object to the container.
I want to develop an executable (EXE) application.
And the main user interface for the application is menu, launched using 'do mymenu.mpr' from main program.
I believe this must be the Main VFP Window.
So, could I use NewObject to add an Object to main VFP window ?
Should I use _SCREEN.NewObject("classname","classlib.vcx" or _VFP.NewObject("classname","classlib.vcx" ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.