Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing MSComm control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00944223
Message ID:
00944513
Views:
21
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
*-- for testing
public oForm
oForm = create("form")
oForm.NewObject("MSComm", "MyMSComm)
*-- eof for testing

define class MyMSComm as MSComm of ...\vcx\MSComm.vcx

 *-- do Your stuff here
 
enddefine  && MyMSComm
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.
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform