Visual Inheritance

Microsoft's .NET Framework supports an interesting new feature called Visual Inheritance. As you will recall from Chapter 5, inheritance allows you to build new classes that extend the functionality of their base class. In Windows Forms, Visual Inheritance allows you to create new forms by inheriting the appearance and functionality of existing forms. In the derived form, you can see the controls on the base form as well as add new controls. This is all accomplished using the Inherits keyword. For example, SomeNewForm can inherit the appearance, controls, events handling, etc. from SomeBaseForm by coding:

Public Class SomeNewForm
						Inherits SomeBaseForm

   ...

End Class

In the following two subsections, we will discuss the development ...

Get Application Development Using Visual Basic® and .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.