Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does the following Fail?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00859246
Message ID:
00859835
Views:
16
Hi Larry

Yes I was aware of this issue that is why I created a olecontrol class in my class library based on the ActiveX control I wanted to use. I can then dynamically add it to a form as shown in the article. The real issue for me is why I cannot add it to a container object the same way using myContainer.AddObject("myole","myole").

Thanks
Simon


>>Hi Larry
>>
>>I understand what you are saying but I still am missing why the same control can be created without a form using the "VPEControl.VPEControl.35" syntax but once it is subclassed as a VFP oleControl a form is required. This would be consistent if the class designer also forced me to use a form control but it does not. I can add my subclassed olecontrol to a container or custom class at design time and it works fine. The only thing I cannot do is add it to a container or custom class at run time using the AddObject method. However I can add the ActiveX control to a container or custom object at run time using the "VPEControl.VPEControl.35" syntax. So it appears to me that something is inconsistent with the olecontrol class in VFP.
>>
>>The solution I am using now is to simply to add the control to my custom class at design time. However, I was hoping to do it a run time so I could maintain a looser coupling between my classes in the class library.
>>
>
>Simon,
>IMO, you should be doing the "work around". See MSKB#192693 for information on problems when using AddObject at runtime. It applies to most MS ActiveX controls and I've seen it with other vendors as well.
>
>Regards.
Simon White
dCipher Computing
Previous
Reply
Map
View

Click here to load this message in the networking platform