>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