MsComm32.ocx's portopen 
Author Message
 MsComm32.ocx's portopen

What you see in the properties dialog (where it says "Write-only") is
*wrong*, I use the PortOpen property to determine if the port is open or
not, and it works just fine. I READ it to see if it is .T. or .F., and if
.F. I write .T. to it to open the port.  Then I read it again and it returns
.T.

If you read the docs in the help file for the MSComm Control, it indicates
that you can ideed write to it - it's just a typo, ignore it, you have to
set this property to .T. to open the port.


Quote:
> Hi All,

> Can anyone tell me why in the properties PortOpen always is Write Only,
but
> I cannot change.
>   Appreciated for point out my mistake

> CCW



Fri, 07 Mar 2003 03:00:00 GMT  
 MsComm32.ocx's portopen
FWIW, you can't write to it at design time, but it is read/write at runtime.


Quote:
> Hi All,

> Can anyone tell me why in the properties PortOpen always is Write Only,
but
> I cannot change.
>   Appreciated for point out my mistake

> CCW



Fri, 07 Mar 2003 03:00:00 GMT  
 MsComm32.ocx's portopen
Hi All,

Can anyone tell me why in the properties PortOpen always is Write Only, but
I cannot change.
  Appreciated for point out my mistake

CCW



Sat, 08 Mar 2003 09:29:43 GMT  
 MsComm32.ocx's portopen
FWIW.....

This is at the start of a routine that sends data to the port:

* Make sure the port is open
IF .NOT. THISFORM.OLECOMM.PORTOPEN
 wait wind 'You must first open the port!' time 1
 RETURN
ENDIF

And this is how I actually open the port:

* SET PORT
thisform.OLECOMM.COMMPORT = 2
thisform.OLECOMM.RTHRESHOLD = 1
thisform.OLECOMM.SETTINGS = '9600,N,8,1'
thisform.OLECOMM.HANDSHAKING = 2

* Now open the port
thisform.OLECOMM.PORTOPEN = .T.


Quote:
> Thanks Emberts,

> I will try it.

> Thanks

> CCW


> > Hi All,

> > Can anyone tell me why in the properties PortOpen always is Write Only,
> but
> > I cannot change.
> >   Appreciated for point out my mistake

> > CCW



Sat, 08 Mar 2003 03:00:00 GMT  
 MsComm32.ocx's portopen

Thanks Emberts,

I will try it.

Thanks

CCW


Quote:
> Hi All,

> Can anyone tell me why in the properties PortOpen always is Write Only,
but
> I cannot change.
>   Appreciated for point out my mistake

> CCW



Sun, 09 Mar 2003 08:54:03 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Netmanage OCX's (WINSCK.OCX)

2. Using MSCOMM32.OCX

3. MSCOMM32.OCX problems

4. VFP6 and MSComm32.OCX

5. Using higher baudrates like 28.8K bps with MSCOMM32.OCX

6. MSCOMM32.OCX and higher baud rates???????

7. MSCOMM32.OCX in IE4/5

8. About MSCOMM32.OCX in VFP 3.0

9. Serial communication with MSCOMM32.OCX

10. Problems with MSCOMM32.OCX

11. mscomm32.ocx and binary mode

12. help on using mscomm32.ocx

 

 
Powered by phpBB® Forum Software