How to Create Your Own Base Class for Custom Default Form

Article translations Article translations
Article ID: 124125 - View products that this article applies to.
This article was previously published under Q124125
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


When you start the Form Builder in Visual FoxPro version 3.0, a generic form is created for you by default. You can then modify or change this generic default form to make a custom default form. Then this customized template can be used with the Form Builder.

This article shows by example how to create a custom default form.


When you create your own Base Class, you are creating a subclass of Visual FoxPro's base class. A Form is a Base Class in Visual FoxPro. You can create a new subclass of the Base Class Form that can act as the default Form. This allows you to set a form the way you like it (background, color, logo, fonts, and so on). Then you can have Visual FoxPro call your design as the default (base) form whenever you create a new form.

Step-by-Step Example

  1. Create a form the way you want it. Then from the File menu, choose Save As Class. In the next dialog, select the the Current Form check box, and give the name of the class and the .VCX file where it will be stored.
  2. Choose Options From the Tools Menu.
  3. Select the Controls Tab, and add the Class library in which this form class is stored. This process is called "registering" the class library.
  4. Select the Forms Design tab. The registered library should appear in the Form edit box of the Template Classes region. If no libraries are listed, click the check box next to 'Form:' and select your class library. If you have more than one form class, select the one you want to be the default. (Look for it on the right-hand side, under Class Name.)
  5. Click OK.
  6. Create a new form. It should have the properties of your template.


Article ID: 124125 - Last Review: February 24, 2014 - Revision: 1.1
  • Microsoft Visual FoxPro 3.0 Standard Edition
kbnosurvey kbarchive KB124125

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from