Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem accessing a known good property
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Problem accessing a known good property
Miscellaneous
Thread ID:
00421330
Message ID:
00421330
Views:
41
I have created an ActiveX control (in VC++) and I am finding some odd
behavior when I run it under VFP 6.0 SP3. The following code in a .PRG fails (on the line shown) with the error:

"Unrecognized command verb"

oPort = CREATEOBJECT('MyControl.Port.1') && create object
IF TYPE('oPort') == 'O' && object was created correctly
oPort.PortName = "COM1"
oPort.Speed = 2400 <=== fails on this line
...

The reason that this is odd is that if I type the above code into the
command window it runs fine (i.e. property 'Speed' does exist!). Needless to say the equivalent VB code to the above runs fine as well.

Why would 'oPort.Speed = 2400' fail only in a .PRG?

Many thanks.
---------------------------------------
Magna Carta Software, Inc.
WEB: www.magnacartasoftware.com
Support: support@magnacartasoftware.com
Sales: sales@magnacartasoftware.com
FAX: +1 (972) 377-9074
7000 Independence Pkwy., Ste. 160-227
Plano, TX 75025, USA
Next
Reply
Map
View

Click here to load this message in the networking platform