Chapter 6. Inheritance and Interfaces

As you begin to work more with classes, you soon come across programming cases where you have classes that are similar to others you are already using in this program or another one. It seems a shame to just copy all that code over again and have a lot of objects that are separate but very alike.

In languages like Java and VB.NET, you can derive new classes from existing classes and change only those methods that differ in the new class, with the unchanged parent methods called automatically. VB6 does not support this level of inheritance, but it does provide interfaces and implementations that allow you to produce related classes with only a small amount of effort.


In VB, you can create a class containing ...

Get Visual Basic Design Patterns: VB 6.0 and VB.NET now with O’Reilly online learning.

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