When you select one of these new types of form, a copy of a prebuilt form is taken and added to your project. In some cases this may simply mean that a few controls have already been placed on the form for you, whereas in other cases there may be significant amounts of code already added. These projects, forms, classes, and modules are all installed in the TEMPLATE folder of your Visual Basic installation.
To create your own templates, simply create the form, module, class, or project that you wish to use as a template, and then save the files in the appropriate subfolder of the TEMPLATE folder. Note that when creating a project template, if you do not want the forms, modules, or classes to be individually selectable, you should save them all in the PROJECTS folder.
What to Do When the Base Code Cannot Be ChangedThe base code runs as part of an ActiveX DLL with all the functions in a GlobalMultiUse class. Subroutine Foo is part of the base code. It currently takes one parameter and is called from six applications that use the base code.
One of the six applications needs an extra parameter to be added to Foo. Due to the impact on other applications, this change to the base code is refused. So what can the application do? Simple-subclass Foo! This allows us to retain the existing functionality in the base code but to extend it specifically for this application.
It is possible to subclass our own routines in exactly the same way I described earlier the subclassing of the standard Visual Basic routines.