Even More Windows Secrets for Visual Basic .NET
The Facts on Visual Inheritance
Visual inheritance allows you to create one "master" form, then have other Windows forms inherit its layout and code. For example, you might create one master form for your application wizard, then add further wizard forms that automatically inherit its appearance and functionality, customizing each as appropriate.
To use visual inheritance, first design and code your master form, then build your application (Ctrl+Shift+B). Next, select Project > Add Inherited Form from the menu. Enter a name, click on Open, and choose the form you wish to inherit from. Then, further customize this form to meet your needs.
It's worth noting that any changes you make here will not alter your original form; rather, they will just override those original inherited settings from your master form.
Page 3 of 5
This article was originally published on February 10, 2003