Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public WithEvents X as OCX - breaks Binary Compatibility
Message
De
01/04/2002 15:45:53
Richard Recore
Debt Management Associates
Boca Raton, Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Public WithEvents X as OCX - breaks Binary Compatibility
Divers
Thread ID:
00639663
Message ID:
00639663
Vues:
104
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform