Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OleControl must have container?
Message
 
To
24/07/2001 00:12:56
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00534134
Message ID:
00534362
Views:
15
>>>>I am using the oleControl base class to subclass a non-visual ActiveX control. When I try to instantiate the subclassed control in code, I get error 1435 "Object class is invalid for this container".
>>>
>>>What is the code you're using to instantiate the control?
>>
>>
>>Local loControl
>>
>>* Instantiating ole class directly fails
>>loControl = NewObject("oleMyControl","MyLibrary")
>
>Can you give me at least a hint about what the control is? Or what it does? More than just that it's non-visual. Subclassed from...? OleBoundControl?
>
>Have you tried using the newObject method of your form (or page, or whatever) to add it?
>thisform.NewObject("oleMyControl"), for example.

Hi Nancy,

Sorry. Sometimes I tend to cloud the water with too much info. The ActiveX control is Safe Serial, which is used to help prevent piracy. (Of course, I'm completely against such measures in Microsoft XP products, but for some reason it's ok for me to do it to our clients. Go figure <g>.) Since the control has no visual elements, I wanted to instantiate it in a prg instead of on a form. I can instantiate the control directly with CreateObject("SaSe.SafeSerial"), but I wanted to define some properties and methods at design time, so I subclassed the control as oleControl. I was surprised that I couldn't instantiate the oleControl object in my prg, which led to my post. So far, it works only if I drop it on a form class, and instantiate the form in the prg.

Thanks.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform