Share via


Adding Classes to Forms

You can drag a class from the Project Manager to the Form Designer or to the Class Designer. You can also register your classes so that they can be displayed directly on the Form Controls toolbar in the Class Designer or Form Designer and added to containers the same way the standard controls are added.

To register a class library

  1. From the Tools menu, choose Options.
  2. In the Options dialog box choose the Controls tab.
  3. Select Visual Class Libraries and choose Add.
  4. In the Open dialog box, choose a class library to add to the registry and choose Open.
  5. Choose Set as Default if you want the class library to be available in the Form Controls toolbar in future sessions of Visual FoxPro.

You can also add your class library to the Form Controls toolbar by choosing Add in the submenu of the View Classes button. To make these classes available in the Form Controls toolbar in future sessions of Visual FoxPro, you still need to set the default in the Options dialog box.

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 | Subclassing a Class Definition | Operating the Class Designer | Class Member Protection and Hiding | Specifying Design-Time Appearance for a Class | Creating, Copying, and Removing Class Library Files | Default Property Setting Override | Container Hierarchy Object Referencing | Setting Properties | Calling Methods | Event Response