Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object class is invalid for this container (OLEControl)
Message
From
18/11/2002 05:01:11
 
 
To
18/11/2002 04:07:28
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00723758
Message ID:
00723762
Views:
28
Hi!

Following could only work at all:

object.ADDOBJECT("myproperty", "myoleclass")

This is because CreateObject could not create ActiveX objects.

Also, check follwoing conditions:

- You're adding ActiveX ito the form (object is a VFP form object)
- "myoleclass" is available, in other words, you used SET CLASSLIB ... ADDITIVE command to load class library with that class.

HTH.

>hi,
>I have a custom class named "myoleclass" that contain a ActiveX control.
>I face problem of CREATEOBJECT() during runtime.
>I tried the following code but it return "Object class is invalid for this container"
>
>
>myvar = CREATEOBJECT("myoleclass")
>Or
>object.myproperty = CREATEOBJECT("myoleclass")
>Or
>object.ADDOBJECT("myproperty", "myoleclass")
>
>It work in VFP7 but not in VFP6
>
>Any workaround?
>How to acess this object without adding it to form?
>
>Thank you
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
Next
Reply
Map
View

Click here to load this message in the networking platform