VB Code:
Private Sub Command1_Click()
Text1 = ""
Winsock1.SendData Text2
End Sub
Private Sub Command2_Click()
frmMain.Show
End Sub
Private Sub Form_Load()
Winsock1.Connect "xx.xx.xxx.xx", "29900"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Winsock1.Close
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command1_Click
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim incommingData As String
Winsock1.GetData incommingData, vbString, bytesTotal
Text1 = Text1 & incommingData
Me.Caption = Len(incommingData) & " : " & bytesTotal
End Sub