
public VB.Label breaks binary compatibility?
you cannot use vb intrinsic controls as public members - as the compiler
mentions for sure!!!
you must declare it as object or variant and you can use it only with late
binding (no events), but this breaks encapsulation and this is not OO
Quote:
> I'm trying to compile a (VB6SP4) dll that has a public attribute of type
> VB.Label. It compiles (and works) fine using Project Compatibility, but if
I
> set the existing DLL as the reference DLL, then set the project to Binary
> Compatibility, then I get a "breaking compatibility" message when I try to
> recompile the DLL.
> The message complains that the "old" DLL used type Object, but the "new"
DLL
> wants to use VB.Label. Of course the original "old" project also used
> VB.Label when it was compiled.
> If I change the type of the object from VB.Label to Object then repeat the
> expirement -- the DLL compiles fine.
> Obviously there is something "special" about using Microsoft's own
controls
> as public attributes in a DLL! Can anyone explain this to me? Is there a
> (better) workaround?
> Thanks in advance,
> Bill