General information
Title:
Public WithEvents X as OCX - breaks Binary Compatibility
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only