Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public WithEvents X as OCX - breaks Binary Compatibility
Message
From
01/04/2002 15:45:53
Richard Recore
Debt Management Associates
Boca Raton, Florida, United States
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Public WithEvents X as OCX - breaks Binary Compatibility
Miscellaneous
Thread ID:
00639663
Message ID:
00639663
Views:
103
Does anyone know anything about the problems described below?


I am trying to create an VB 6.0 ActiveX DLL in which I have a set of class modules defined with the following declaration:

Public WithEvents ControlObject as XXXXX

XXXXX is a VB 6.0 control type - either an intrinsic VB control (TextBox, etc.) or an ActiveX (.OCX) control (MaskEdBox, DTPicker, etc.)


This declaration works with no problem for intrinsic VB controls.

However, for classes that use this declaration for ActiveX controls, it works - but with the following quirks:

1) Any EXE that references these classes in the DLL must be compiled on the same PC as was the DLL (or we get a Run-time error '13' - Type mismatch - whenever the ControlObject property is assigned).

2) When XXXXX is a ListView control, recompiling the DLL without changing any code whatsoever causes the DLL to break binary compatibility (when the DLL project is set to binary compatible mode) after every recompile.


These problems go away if I compile these classes into the EXE rather than into a DLL - but I would prefer to use a DLL if at all possible!


Any information or suggestions would be much appreciated!! Thanks.
Reply
Map
View

Click here to load this message in the networking platform