Jeff,
Yes You can subclass the MSComm but You can't do something like loMyComm = create("MyMSComm"). However You can place it on a simple form and work from there.
What I ALWAYS do with OCX's is: create a class in a vcx and throw the ActiveX in that without any modification.
secondly subclass that in code and use this. I found the vcx necessary for some AcitveX's due to their licensing models.
So You could do:
- create class MSComm of MSComm.vcx as OleControl
- select the "Microsoft Communications Control V. 6" and save the Class
- open a new prg (or Your OLE-Control-Class-prg) and
public oForm
oForm = create("form")
oForm.NewObject("MSComm", "MyMSComm)
define class MyMSComm as MSComm of ...\vcx\MSComm.vcx
enddefine
Calling the prg should not produce any errors and allow ? oForm.MSComm.Name or something more tempting
You will never need to actually show the form, it's just needed as a container.
HTH
>Is it possible to subclass the Ms Comm control in code. Create an instance of this control and don't need a form.
>
>Whenever I try to subclass the the control as an oleObject I get: "Object class is invalid for this container."
>
>Any ideas are appreciated.