Opens a .vcx visual class library containing class definitions.
Syntax
SET CLASSLIB TO ClassLibraryName [IN APPFileName | EXEFileName]
[ADDITIVE] [ALIAS AliasName]
Arguments
TO ClassLibraryName
Specifies the name of the .vcx visual class library to open. If ClassLibraryName does not include a fully qualified path, Visual FoxPro first searches for the visual class library in the default Visual FoxPro directory, and then in the directories in the Visual FoxPro path. The default Visual FoxPro directory is specified with SET DEFAULT, and the Visual FoxPro search path is specified with SET PATH.
Issuing SET CLASSLIB TO without ClassLibraryName closes all open visual class libraries. Use RELEASE CLASSLIB to close an individual visual class library.
IN APPFileName | EXEFileName
Specifies a Visual FoxPro application file (.app) or executable file (.exe) containing the visual class library.
ADDITIVE
Opens the .vcx visual class library without closing any currently open .vcx visual class libraries. If this clause is omitted, all open .vcx visual class libraries are closed.
ALIAS AliasName
Specifies an alias for the visual class library. The visual class library can be referenced by its alias. For example, the following commands open a .vcx visual class library named MyClass
, assign it the alias MyCntrls
, and then create a control named MyButton
.
SET CLASSLIB TO MyClass ALIAS MyCntrls
mMyButton = CREATEOBJ('MyCntrls.MyButton')
Remarks
When CREATEOBJECT( ), ADD OBJECT in DEFINE CLASS, or the AddObject method is issued, Visual FoxPro searches for the class definition defining the object specified in these commands in the following locations and order:
If the class definition containing the object cannot be located, Visual FoxPro generates an error message.