Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing an OCX
Message
From
21/01/2000 16:37:34
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00319745
Message ID:
00321143
Views:
26
>>>>>>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
>>
>>I honestly haven't played with that yet. It should work with the browser. Can you copy other classes that way?
>>
>>Markus
>
>Yep, other classes move/copy just fine. Just not these container-based ones.

No, only ones based on the OLEContainer. OLEContainer objects have to live in a form- ost other VFP controls are fine with CREATEOBJECT().
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform