Inheritance
Inheritance commands can be used to make a
duplicate of a form with its objects and properties. The duplicate can
then be customized.
Inheritance Picker
Use to integrate existing forms into a project.
-
Create the first form, including only labels
and controls which will be common to all the forms you will create
from it. I call this form the template and name it
template.vb.
-
Save the project.
-
Build the project by pulling down the Build
menu, then chose Build project name. This step causes VB to
compile, or recompile the project, creating the .exe and .dll files.
When the base form is recompiled, the changes will be passed to the
inherited form.


When the build is complete, the words Build
succeded will appear at the bottom left corner of the window.


Another window will open, where you can choose
which form you want to have inheritance drawn from. Click the browse
button to access other forms in other projects, if the form you want inheritance from is
not within the current project. The form files have a .dll extension.
The window closes and your new form will appear
in the IDE. Make whatever customizing adjustments you need to it, to
make this version of the form unique. The screen size is identical.
My example will use the template form to develop the MsinMenu, Add Item,
Edit Item and Print Report forms.
The title items and the exit button will be in exactly the same place.
When I switch from the Main Menu form to another form, it will
not look like forms have changed at all. It will appear as
though the Main Menu form has only changed its content. I save
development time.

|