Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a ocx into a container manually
Message
From
20/12/1999 15:49:38
 
 
To
20/12/1999 15:40:54
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00306400
Message ID:
00306408
Views:
34
>I wonder if can we drop an ocx into a container and instatiate it at runtime?
>
>
>Can I do it as manually? EG: in the command window I would be doing the following:
>
>lo = creat('container')
>=lo.addobject("clientmail","mail.ocx")
>

You don't add the file, you add the ProgID or CLSID of the ActiveX control. For example, you don't specify the name of the file, like:

=lo.AddObject("commhandler","mscomm32.OCX")

to add the MSCOMM low-level serial control; you use the ProgID of the ActiveX control instead:

=lo.AddObject("commhandler","MSCOMMLib.MSComm")

The ProgID is the name of the class, in the same way that "textbox" is the name of the VFP native textbox class.

>I believe I can do it with classes such as:
>=lo.addobject("txtname","textbox")
>
>and the question is if I use the ocx control instead, Will VFP allow me to do it?
>
>Thank you
>
>Gan
>Go Chiefs 9-5
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform