Implementation Inheritance Example for VB6

John Conwell

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
Ok, I know VB6 does not do true implementation inheritance, but you can 'fake' it very well. And with VB.NET comming soon with full Object Oriented functionality, apps designed and written in VB6 who do this style of fake inheritance can convert their code to .NET with very little work. This way you can design apps to take advantage of inheritance now and not have to redesign them later.

The advantages of true implementation inheritance is that if you have several objects that share like properties or methods, you can group these shared properties and methods into one generic super class. Then these specific sub classes can inherit the super class. This will give add all the properties and methods of the super class to the sub classes. This is really good for code reuse. If you have 5 subclasses inheriting from a super class and have to make a change to one of the shared methods, you can change it in one place and not in 5. the change to the superclass will 'trickle down' to the sub classes.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.