Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Object class is invalid for this container' Error
Message
From
25/10/2001 10:09:15
 
 
To
25/10/2001 10:04:19
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00573157
Message ID:
00573163
Views:
22
This message has been marked as the solution to the initial question of the thread.
Hi!

You cannot add such kind of objects to the form using usual VFP objects containership tree rules. COM object is not a native VFP object (or VFP object wrapper for ActiveX). You cannot create visual class in VFP that become ActiveX insertable to VFP form as usual ActiveX (in VF you can create visual ActiveX).

If you just try to use non-visual COM object, instead of AddObject() use following:

thisform.addProperty('loCir',createobject('circuitos.circuito'))

HTH.

>Hi,
>I´m adding an COM Server (DLL) to a form, by this code at run time:
>thisform.addObject('loCir','circuitos.circuito')
>And it gives me exactly this error:
>'Object class is invalid for this container'
>
>The DLL is correctly registered. Custom class is its parent, and only has a few methods.
>What am I doing wrong?
>
>Thanks,
>Ibai
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform