Subclassing a Class Definition

Visual Studio .NET 2003

You can create a subclass of a user-defined class in one of two ways.

To create a subclass of a user-defined class

  1. In the Project Manager New Class dialog box, click the dialog button to the right of the Based On box.
  2. In the Open dialog box, choose the class you want to base the new class on.

    -or-

  • Use the CREATE CLASS command.

    For example, to base a new class, x, on parentclass in Mylibrary.vcx, use this code:

    CREATE CLASS x OF y AS parentclass ;
      FROM mylibrary
    

See Also

Object-Oriented Programming | Classes and Objects: The Building Blocks of Applications | Classes in Visual FoxPro | Preparation for Class Creation | Creating Classes | Modifying a Class Definition | Operating the Class Designer | Class Member Protection and Hiding | Specifying Design-Time Appearance | Creating, Copying, and Removing Class Library Files | Adding Classes to Forms | Default Property Setting Override | Container Hierarchy Object Referencing | Setting Properties | Calling Methods | Event Response

Show: