Does VBA support interface inheritance?

Does VBA support interface inheritance?

Anonymous
Not applicable
4,063 Views
18 Replies
Message 1 of 19

Does VBA support interface inheritance?

Anonymous
Not applicable
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
various programs require a form to allow user to select some acad
collection item
ProgA wants a form SelectBlock
ProgB wants a form SelectLayer
ProgC wants a form SelectDimStyle
etc

so all those forms could theoretically derive from Ifrm_SelectCollectionItem
Ifrm_SelectCollectionItem has a ListBox and two command buttons
cmdSelectItem and cmdClose

I vaguely understand the idea of interfaces
a (virtual) class with method signatures only (empty), implemented by some
(concrete) class which implements the interface
As a form is also a class, i was wondering if the same can apply to forms

Not sure how that would have to be coded
Not sure if theres an advantage compared to just 3 simple forms, one for
each collection type,
or rather one form with a property for which collection to look at,
dim f as frmSelectCollectionItem
Set f = New frmSelectCollectionItem
f.CollectionType = "Blocks"
f.Title = "Select Block"
f.Show

but thought I'd ask to see what the experts might say

Thanks for any ideas
Mark
0 Likes
4,064 Views
18 Replies
Replies (18)
Message 2 of 19

Anonymous
Not applicable
When you do VB/VBA inheritance, you can only use "Implements" keyword to
implements a class definition. That is, the class to be implemented is
equivalent to C++/C#'s abstract class: only having property/method
definition.

Although a UserForm in VBA is a class, it is not a "abstract" one. It has a
visual portion - Form. With VB/VBA, even, in theory, you can implement a
UserForm, you still have to actually add real form in the implementing
class, because the base form class is "abstract" class, it does not expose
its contents, only its property/method signatures. So, there is not point,
or not possible, to have a UserForm that can derive from a base UserForm in
VB/VBA without redoing the UserForm in the derived UserForm.


"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
various programs require a form to allow user to select some acad
collection item
ProgA wants a form SelectBlock
ProgB wants a form SelectLayer
ProgC wants a form SelectDimStyle
etc

so all those forms could theoretically derive from Ifrm_SelectCollectionItem
Ifrm_SelectCollectionItem has a ListBox and two command buttons
cmdSelectItem and cmdClose

I vaguely understand the idea of interfaces
a (virtual) class with method signatures only (empty), implemented by some
(concrete) class which implements the interface
As a form is also a class, i was wondering if the same can apply to forms

Not sure how that would have to be coded
Not sure if theres an advantage compared to just 3 simple forms, one for
each collection type,
or rather one form with a property for which collection to look at,
dim f as frmSelectCollectionItem
Set f = New frmSelectCollectionItem
f.CollectionType = "Blocks"
f.Title = "Select Block"
f.Show

but thought I'd ask to see what the experts might say

Thanks for any ideas
Mark
0 Likes
Message 3 of 19

Anonymous
Not applicable
Thanks Norman,
That makes sense and is why I could not imagine how one would actualize the
idea.
This is also why I still am having trouble understanding the reason why
Implementing an Interface is so much preferrable to just using a concrete
class in the first place.

as you point out...
you can implement you still have to actually add real form in
the implementing
class

In any interface, all you get is the method/property "contract"
So you still have to "implement" everything in a concrete class.
So you end up with two classes, an interface and the implementation.
Where as you would get the exact same result with just the concrete class.
So in a simple example it's extra complexity for the same result
I'm sure in a more complex application it has benefits with multiple
developers working independently in different areas but in a one man
situation on a simple program I'm not sure if there's any reason to go this
route?
Any input?

Thanks again,
Mark




"Norman Yuan" wrote in message
news:5543232@discussion.autodesk.com...
When you do VB/VBA inheritance, you can only use "Implements" keyword to
implements a class definition. That is, the class to be implemented is
equivalent to C++/C#'s abstract class: only having property/method
definition.

Although a UserForm in VBA is a class, it is not a "abstract" one. It has a
visual portion - Form. With VB/VBA, even, in theory, you can implement a
UserForm, you still have to actually add real form in the implementing
class, because the base form class is "abstract" class, it does not expose
its contents, only its property/method signatures. So, there is not point,
or not possible, to have a UserForm that can derive from a base UserForm in
VB/VBA without redoing the UserForm in the derived UserForm.
0 Likes
Message 4 of 19

Anonymous
Not applicable
The power of interfaces is that they allow you to treat different types of
concrete classes as if they were the same type. For example, you can
iterate over all IAcadEntity instances in a drawing's modelspace and call
their GetBoundingBox method and your iterating code doesn't have to worry
that a Circle's GetBoundingBox method is coded different than a Line's
GetBoundingBox method.

Interfaces also allow new object types to be created and added to drawings
without breaking your existing code. They just have to implement the
IAcadEntity interface and your code magically works with them.

The additional up front work of creating an interface pays off in the code
that accesses different types through a common interface and later on down
the road in the maintenance phase, which is the real time saver.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes
Message 5 of 19

Anonymous
Not applicable
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
various programs require a form to allow user to select some acad
collection item
ProgA wants a form SelectBlock
ProgB wants a form SelectLayer
ProgC wants a form SelectDimStyle
etc

so all those forms could theoretically derive from Ifrm_SelectCollectionItem
Ifrm_SelectCollectionItem has a ListBox and two command buttons
cmdSelectItem and cmdClose

I vaguely understand the idea of interfaces
a (virtual) class with method signatures only (empty), implemented by some
(concrete) class which implements the interface
As a form is also a class, i was wondering if the same can apply to forms

Not sure how that would have to be coded
Not sure if theres an advantage compared to just 3 simple forms, one for
each collection type,
or rather one form with a property for which collection to look at,
dim f as frmSelectCollectionItem
Set f = New frmSelectCollectionItem
f.CollectionType = "Blocks"
f.Title = "Select Block"
f.Show

but thought I'd ask to see what the experts might say

Thanks for any ideas
Mark
0 Likes
Message 6 of 19

Anonymous
Not applicable
"Bobby C. Jones" wrote

>> The power of interfaces is that they allow you to
>> treat different types of concrete classes as if they
>> were the same type. For example, you can iterate
>> over all IAcadEntity instances......

Ummmmm...

While that's true, the IAcadEntity example you cite is
a bit misleading, because in that case, it is more about
the power of class/implementation inheritance, and
virtual methods, rather than interfaces.

IAcadEntity is just the COM interface for AcDbEntity,
which is the common base class for all objects that
you can see.

In that case, methods like GetBoundingBox are not
abstract interface methods, they are wrappers around
virtual methods of the underlying classes (AcDbEntity
and so on), that can be overridden by the underlying
derived classes to provide specialized implementations.

In that case, the COM interfaces are simply mirroring
the class methods and inheritance, mainly because it
makes perfect sense to do that.

>> Interfaces also allow new object types to be created
>> and added to drawings without breaking your existing
>> code. They just have to implement the IAcadEntity
>> interface and your code magically works with them.

They must also derive from AcDbEntity as well, and again,
the ability to do that has nothing specifically to do with
interfaces, the same thing can be done without interfaces.

In native or managed ObjectARX for example, if a new
type of drawing entity is derived from AcDbEntity, which it
must be, then you can cast it to an AcDbEntity and
manipulate it as such, without knowing anything about any
of the classe(s) that derive from it, up to and including the
concrete instance class. More importantly, you can do that
without using any interfaces.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
0 Likes
Message 7 of 19

Anonymous
Not applicable
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 8 of 19

Anonymous
Not applicable
Mark,
With VB6 you can implement the interface of a concrete class, just like the
Author is saying. What you can't do is inherit the implementation of a base
class. You can implement the interface and then delegate calls back to an
instance of the base class. However, having to jump through those kind of
coding hoops to "gain results that are equivalent to implementation
inheritance" is exactly why I started looking for a language other than VB6.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes
Message 9 of 19

Anonymous
Not applicable
Thanks for those clarifications Tony.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes
Message 10 of 19

Anonymous
Not applicable
"Bobby C. Jones" wrote:

>> With VB6 you can implement the interface of a
>> concrete class, just like the Author is saying.
>> What you can't do is inherit the implementation
>> of a base class.

I suppose that's because there is no such thing
as a 'base class' in VB6 🙂

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
0 Likes
Message 11 of 19

Anonymous
Not applicable
Sorry but I have to ask if you're talking about VB6
or VB.NET ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message news:5544438@discussion.autodesk.com...
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 12 of 19

Anonymous
Not applicable
vb6

"Tony Tanzillo" wrote in message
news:5544719@discussion.autodesk.com...
Sorry but I have to ask if you're talking about VB6
or VB.NET ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544438@discussion.autodesk.com...
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 13 of 19

Anonymous
Not applicable
Which one did you find?
Mark

"Bobby C. Jones" wrote in message
news:5544604@discussion.autodesk.com...
Mark,
With VB6 you can implement the interface of a concrete class, just like the
Author is saying. What you can't do is inherit the implementation of a base
class. You can implement the interface and then delegate calls back to an
instance of the base class. However, having to jump through those kind of
coding hoops to "gain results that are equivalent to implementation
inheritance" is exactly why I started looking for a language other than VB6.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes
Message 14 of 19

Anonymous
Not applicable
I'm not sure why you're exploring OOP in the
context of using a programming langauge that
is not really not object oriented.

Or are you just warming up to make the big leap ? 😉

My advice is to waste no more time studying
anything in the context of VB6 because that
language is going to fade away.

Microsoft, Autodesk and many others have already
made it clear that all of their COM/ActiveX based
APIs are in "maintainence mode", and I'm sure you
know what that means: All new API functionality is
going to be exposed via .NET, and not be available
to VB6 or VBA based consumers.

The future is .NET and VSTA, and that is where you
should be focusing your attention.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message news:5544692@discussion.autodesk.com...
vb6

"Tony Tanzillo" wrote in message
news:5544719@discussion.autodesk.com...
Sorry but I have to ask if you're talking about VB6
or VB.NET ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544438@discussion.autodesk.com...
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 15 of 19

Anonymous
Not applicable
I've heard of lots of vbers going to delphi
are you going from delpi to .net?
do you like .net?

"Tony Tanzillo" wrote in message
news:5544711@discussion.autodesk.com...
I'm not sure why you're exploring OOP in the
context of using a programming langauge that
is not really not object oriented.

Or are you just warming up to make the big leap ? 😉

My advice is to waste no more time studying
anything in the context of VB6 because that
language is going to fade away.

Microsoft, Autodesk and many others have already
made it clear that all of their COM/ActiveX based
APIs are in "maintainence mode", and I'm sure you
know what that means: All new API functionality is
going to be exposed via .NET, and not be available
to VB6 or VBA based consumers.

The future is .NET and VSTA, and that is where you
should be focusing your attention.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544692@discussion.autodesk.com...
vb6

"Tony Tanzillo" wrote in message
news:5544719@discussion.autodesk.com...
Sorry but I have to ask if you're talking about VB6
or VB.NET ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544438@discussion.autodesk.com...
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 16 of 19

Anonymous
Not applicable
Prior to .NET, robust AutoCAD developement
could not be done with a single high-level
API, so I was using a combination of Delphi
and C++/ObjectARX (as well as a little LISP).

But Delphi was limited to using the same
ActiveX API used by VBA, and could only be
extended by writing C++ based ActiveX ARX
libraries (and is what ACADX was made for).

Tying all of it together was a lot of work, and
dealing with COM/AutoCAD/ObjectARX version
compatiblity was an absolute nightmare.

Delphi generates native Win32 code that is
much faster than .NET code (in fact, as fast
or faster than native C++), and that was the
main selling point and only thing it had going
for it, once .NET began to gain traction.

The question may be presumptious without
first considering that to use .NET, you need
to also learn some fundamental software
engineering concepts and how to apply them,
because .NET is not like VBA or VB6, it is
more complicated and difficult than the latter
and has a much steeper learning curve, but
the rewards are worth the effort, if you are
planning to do a lot of development or full
time programming.

OTOH, If you're a CAD manager/weekend
programmer, then it may not be worth the
major investment in learning.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message news:5544713@discussion.autodesk.com...
I've heard of lots of vbers going to delphi
are you going from delpi to .net?
do you like .net?

"Tony Tanzillo" wrote in message
news:5544711@discussion.autodesk.com...
I'm not sure why you're exploring OOP in the
context of using a programming langauge that
is not really not object oriented.

Or are you just warming up to make the big leap ? 😉

My advice is to waste no more time studying
anything in the context of VB6 because that
language is going to fade away.

Microsoft, Autodesk and many others have already
made it clear that all of their COM/ActiveX based
APIs are in "maintainence mode", and I'm sure you
know what that means: All new API functionality is
going to be exposed via .NET, and not be available
to VB6 or VBA based consumers.

The future is .NET and VSTA, and that is where you
should be focusing your attention.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544692@discussion.autodesk.com...
vb6

"Tony Tanzillo" wrote in message
news:5544719@discussion.autodesk.com...
Sorry but I have to ask if you're talking about VB6
or VB.NET ?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5544438@discussion.autodesk.com...
Thanks Tony,
As is obvious, I'm just beginning to learn about interfaces and for that
matter object oriented viewpoints
Have just started reading VB DesignPatterns by Stamatakis
discussing the difference between implementation (not in vb) and interface
(in vb) inheritance he shows an example of supposedly interface inheritance

But the inheriting "child or subclass" is implementing a concrete class.

In the unlikely event that anyone reading this has that book it's on pg 27

He shows an axdll concrete class "DomesticDog" with implemented(not empty)
methods
Then he Implements that concrete class with "GermanShepherd", overriding
some methods and delegating to others

In every thing I have seen up till now there has never been an example of
implementing a concrete class
It is alway presented that the interface must be empty(signatures only)

Am I misunderstanding? Can vb implement the interface of a concrete class?
That example sounds exactly like Implementation inheritance which as you
point out is not possible in vb.
He says basically that it's "implementation inheritance coupled with
composition to gain results that are equivalent to implementation
inheritance"(p26)

Thanks for any light you can shine on my dim brain
:-)
Mark

"Tony Tanzillo" wrote in message
news:5543875@discussion.autodesk.com...
What you describe is not interface inheritance, its
implementation inheritance.

Unfortunately, the only kind of inheritance that VBA
can do, is interface inheritance.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"MP" wrote in message
news:5543087@discussion.autodesk.com...
Hi all,
kind of thinking out loud here.
I was wondering if one can use an interface to create polymorphic forms?
sample scenario:
snip
0 Likes
Message 17 of 19

Anonymous
Not applicable
Thanks
Mark

"Tony Tanzillo" wrote in message
news:5544757@discussion.autodesk.com...
Prior to .NET, robust AutoCAD developement
could not be done with a single high-level
API, so I was using a combination of Delphi
and C++/ObjectARX (as well as a little LISP).

But Delphi was limited to using the same
ActiveX API used by VBA, and could only be
extended by writing C++ based ActiveX ARX
libraries (and is what ACADX was made for).

snip
0 Likes
Message 18 of 19

Anonymous
Not applicable
>>Which one did you find?

I use C# for almost all new development.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes
Message 19 of 19

Anonymous
Not applicable
>>I suppose that's because there is no such thing
>>as a 'base class' in VB6 🙂

True that 🙂
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com
0 Likes