PDA

Click to See Complete Forum and Search --> : How to Implement Inheritance in VB


vsarsam
Dec 12th, 2000, 07:24 PM
hi Friends,

Pl. let me know any solution for implementing the Inheritance in Visual Basic.


if yes, how.

Thanks in Advance.


bye.

Dec 13th, 2000, 04:46 AM
Well, in VB6 you can't do inheritance - its one of the biggest flaws (it will be rectified in VB7).

you can sort of cheat by implementing interfaces. Basically, this means that you create an inteface class, which is just a list of procedure and propert stubs, and implement that in a given control or class. This means that you can then talk to that class in a generic way. Look up the implements keyword (I could be here all night describing it properly).

It's not inheritance, but it does allow a form of pseudo-inheritance.

- gaffa

gijsj
Dec 15th, 2000, 07:42 AM
Gaffa, it is inheritance.
There is Interface and Implementation Inheritance.
VB6 only supports Interface Inheritance (like you explained) but it's still Inheritance and definitly no cheat !!