Partager via


CREATE CLASS Command

Opens the Class Designer, allowing you to create a new class definition.

CREATE CLASS ClassName | ? [OF ClassLibraryName1 | ?]   
[AS cBaseClassName [FROM ClassLibraryName2]] [NOWAIT]

Parameters

  • ClassName
    Specifies the name of the class definition to create.

  • ?
    Displays the New Class dialog box, from which you can specify the name of the class definition to create.

  • OF ClassLibraryName1
    Specifies the name of the .vcx visual class library to create. If the .vcx visual class library already exists, the class definition is added to it.

    A .vcx file extension is assumed for the visual class library. Be sure to include the file extension if the visual class library you specify has a file extension other than .vcx.

  • ?
    Displays the New Class dialog box, from which you can specify the name of a new or existing .vcx visual class library to which the class definition is added.

  • AS cBaseClassName
    Specifies the class on which the class definition is based. cBaseClassName can be any Visual FoxPro base class except Column, Cursor, DataEnvironment, Header, Page, and Relation. You can also specify a user-defined class for cBaseClassName if you include the FROM ClassLibraryName2 clause that specifies the name of the .vcx visual class library containing the user-defined class.

    If you omit AS cBaseClassName, the class definition is based on the Visual FoxPro FormSet base class.

  • FROM ClassLibraryName2
    Specifies the name of the .vcx visual class library containing the user-defined class specified with cBaseClassName.

  • NOWAIT
    Continues program execution after the Class Designer has been opened. The program doesn't wait for the Class Designer to be closed, but continues execution on the program line immediately following the line that contains CREATE CLASS NOWAIT. If you omit NOWAIT, when CREATE CLASS is issued in a program, the Class Designer is opened and program execution pauses until the Class Designer is closed.

    Including NOWAIT has no effect on CREATE CLASS when it is issued in the Command window.

Remarks

Use CREATE CLASS to create a class definition and save it in a .vcx visual class library. You can open the .vcx visual class library with SET CLASSLIB, allowing you to access the class definitions within the .vcx visual class library.

See Also

ADD CLASS | _BROWSER | CREATE CLASSLIB | DEFINE CLASS | _INCLUDE | MODIFY CLASS | RELEASE CLASSLIB | Session Object | SET CLASSLIB