Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing an OCX
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00319745
Message ID:
00321109
Views:
24
>>>You can simply do an Form.NewObject("oControlName","ClassName","VCXName.vcx")
>>
>>Whoops, my reply was supposed to be to both you and Erik. Thanks Markus. I was trying to use CREATEOBJECT to an existing property.
>
>It depends on what you want to do. Some controls (like Microsoft.XMLDOM) can rund stand allone and therefore be instantiated using CreateObjet(). All controls that require a container to live in (most ActiveX Controls are like that) can be instantiated with the AddObject() and NewObject() methods.
>
>Markus

I've got a handle on the containership requirements now. Thanks. Another question:
How would you copy a subclass of an ActiveX from one .VCX to another? If you open 2 instances of the class browser and try dragging that class to the other library, you get an "invalid class for this container" error. Same thing if you try to do it within the VFP project, too.

Erik suggested SCATTER/GATHER the class records from the .VCX, and I have done it with a dummy form, drop the class on it, save as class, blank the .VCX classloc field, but there must be a better/easier way than these?

TIA
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform