Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing ActiveX control
Message
From
04/01/2005 14:14:38
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00974138
Message ID:
00974163
Views:
26
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform