Using Inheritance in Windows Forms

If you're a Visual Basic 6 programmer, inheritance is a very exciting new feature that can save you many hours of programming. Inheritance enables you to define classes that serve as the basis for derived classes.

Derived classes inherit a base class's functionality and can extend the properties, events, and methods of the base class. They can also override inherited methods with new implementations. All classes created with Visual Studio .NET are inheritable by default. Because the forms you design are really classes, you can use inheritance to define new forms based on existing ones.

A few good examples of inheriting forms are

  • Data entry pages could be inherited to be used with different data sources, but ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.