Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't Send Text Data from VFP5 to other computer
Message
From
04/07/2001 06:11:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Can't Send Text Data from VFP5 to other computer
Miscellaneous
Thread ID:
00526628
Message ID:
00526628
Views:
56
Please help...

I'm developing a program to capture text data from other computer running HyperTerminal.

I use the MSCOMM32.OCX in VFP5 and create a form to try it.
In the Init event of the form I put the following statements:

WITH THISFORM
.Olecontrol1.CommPOrt = 2
.Olecontrol1.settings = "2400,N,8,1"
.Olecontrol1.InputLen = 0
.Olecontrol1.PortOpen = .T.
ENDWITH

and in the OnComm event of OleControl1 I put the following:

*** OLE Control Event ***
*
#define _END_CHAR CHR(10)
IF THIS.CommEvent = 2
IF THIS.InBufferCount>0
lcString = THIS.Input
IF !(lcString == "")
THIS.Parent.cModemBuffer = THIS.Parent.cModemBuffer + lcString
i = 1
DO WHILE LEN(THIS.Parent.cModemBuffer)>0 AND ;
ASC(SUBSTR(THIS.Parent.cModemBuffer, i, 1))!=0
IF SUBSTR(THIS.Parent.cModemBuffer, i, 1) = _END_CHAR
THIS.Parent.cModemStr = THIS.Parent.cModemStr + LEFT(THIS.Parent.cModemBuffer, i)
THIS.Parent.cModemBuffer = SUBSTR(THIS.Parent.cModemBuffer, i+1)
*
THIS.Parent.ProcessModemStr()
i = 1
ELSE
i = i + 1
ENDIF
ENDDO
ENDIF
ENDIF
ENDIF

cModemBuffer and cModemStr are Properties that I create for the form.
ProcessModemStr is a method that I create for the form to process the cModemStr.

The problem is that I can not receive text data from other computer running HyperTerminal.

But I can send text data from a text box to other computer running HyperTerminal.


Thank's for your help and
Best Regards,
Next
Reply
Map
View

Click here to load this message in the networking platform