Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Active-X Controls On Containers?
Message
From
06/03/1998 13:34:54
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00083030
Message ID:
00083076
Views:
25
>>>>I have a container on which I have a crystal reports Active-X control. My idea was to use this container as a member of my application object so that I can reference reports easily throughout my app (something like goapp.oReport.ReportName = 'blah'). However, when I try to instanciate my container ( x=CreateObject('cntReport') )with the active-x control on it I get the error "object class is invalid for this container." I get this same error for any olecontainer control I drop on my container. Has anyone tried something like this and gotten any results? How can I add an active-x control to my container to be instanciated?
>>>
>>>oApp=createobject("custom")
>>>oApp.addobject("oAppform","form")
>>>oApp.oAppform.addobject("cntOLE","CustomContainerWithOLE")
>>>Now you can use reference oApp.oAppform.cntOLE....
>>
>>Why is this so? Would creating a form class with the active-x control work just as well? I'd prefer not to have a custom control with a form inside it with a active-x control inside it....
>
>I've just tried this and still get the same error...can this be only done programatically? Obviously, I can't add a form to a custom object visually...

The code above was tested before I posted it here, and worked properly.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform