Adds a class definition to a .vcx visual class library.
ADD CLASS ClassName [OF ClassLibraryName1] TO ClassLibraryName2 [OVERWRITE]
- Specifies the name of the class definition added to the .vcx visual class library ClassLibraryName2. If you omit the optional OF ClassLibraryName1 clause, Visual FoxPro searches for the class definition in any .vcx visual class libraries opened with SET CLASSLIB. Visual FoxPro generates an error if the class definition cannot be located or a class definition with the name you specify already exists in ClassLibraryName2.
- OF ClassLibraryName1
- Specifies a .VCX visual class library from which the class definition is copied.
- TO ClassLibraryName2
- Specifies the .vcx visual class library to which the class definition is added. If you specify a .vcx visual class library that does not exist, Visual FoxPro creates the visual class library and adds the class definition to the library.
- Specifies that a class definition with the same name as the class definition you specify with ClassName is overwritten. An error message is generated if you omit OVERWRITE and a class definition with the same name as ClassName already exists in the .vcx visual class library.
Use ADD CLASS to add a class definition to a class library, or to copy a class definition from one .vcx visual class library to another. A class definition cannot be added from a Visual FoxPro program or application (.prg or .app), or a procedure file.