GetData or PeekData and calling a form to display
Posted on 1997-11-04
I have a program that captures data out of the comm port. I also can TELNET to the device but when I try and invoke the peekData or GetData It see's nothing. I am using another form to display the data back, Could that be the issue? Here is the code out of the books online of the GetData I am using. Is there any good examples of TCP/IP (telnet)programs out there?
Private Sub Winsock1_DataArrival_(ByVal bytesTotal As Long)
Dim strData As String
Text1.Text = strData
Here is how it is being called.
Private Sub mnuTelnetOpen_Click()
'Winsock1.RemoteHost = "184.108.40.206"
Winsock1.RemotePort = 23
'txtTerm.Text = ""
Private Sub Winsock1_Connect()
Dim PauseTime, Start, Finish, TotalTime
Dim error1, last1
Winsock1.SendData "root" & Chr(13)
'MSComm1.InputLen = 0 ' Get all available data
'MSComm1.Handshaking = 1
If MSComm1.PortOpen = True Then
Winsock1.SendData "ls" & Chr(13)
Thanks in advance for your help.