public VB.Label breaks binary compatibility? 
Author Message
 public VB.Label breaks binary compatibility?

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



Mon, 21 Apr 2003 04:25:23 GMT  
 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



Mon, 21 Apr 2003 08:34:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Public WithEvents X as OCX - breaks Binary Compatibility

2. Public WithEvents X as OCX - breaks Binary Compatibility

3. Public WithEvents X as OCX - breaks Binary Compatibility

4. Public WithEvents X as OCX - breaks Binary Compatibility

5. BUG: Enumerated Type Parameters Break Binary Compatibility

6. Binary compatibility suddenly breaks after each build

7. Binary compatibility suddenly breaks after each build

8. VB6 & VB5 - Binary Compatibility Broken

9. Recompiling Breaks Binary Compatibility

10. ADO 2.1 > 2.5 Break binary compatibility

11. Use of Optional Parameters breaks binary compatibility?

12. Binary Compatibility Broken

 

 
Powered by phpBB® Forum Software