Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing ActiveX control
Message
De
04/01/2005 14:14:38
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00974138
Message ID:
00974163
Vues:
27
from the command window: CREATE CLASS

in the Class Create dialog: pick a subclass name, select OleControl as the BasedOn, and for StoreIn indicate an existing or new VCX.

When you click OK, you will be asked to select a control (in later versions it defaults correctly to Insert Control). Pick your control.

This lets you subclass the events, etc. The disadvantage is that when the GUID changes (typically when the Interfaces have changed), you lose everything, unless you follow the instructions on the dbi site for moving the new COM code over.

You will also find that ActiveX controls have a life of their own which is on a different diurnal pattern than VFP forms: they SHOW before the ACTIVATE, and bring the form with them. Various solutions, such as David LeMesurier's in the downloads section, have been proposed.

Hank

>Hi everybody,
>
>I am wondering if there is a way to subclass an ActiveX control besides adding it to a form? How can I do it visually with a container? We want to subclass a DbiTech ctDropDate control in order to add two new methods (Validate and SetDates), but we could not figure out the simple way to subclass this control.
>
>
>Thanks a lot in advance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform