Les dejo los Codigos del cliente y Servidor:
CLIENTE:
Código
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vbkey As Long) As Integer Private Sub Form_Load() With Winsock1 .Close .RemoteHost = "127.0.0.1" ' También probe poniendo "localhost" .RemotePort = "1660" .Connect End With Winsock1.SendData Label1 End Sub Private Sub Timer1_timer() Dim i As Integer ' For i = 8 To 222 x = GetAsyncKeyState(i) If x = -32767 Then Select Case i Case vbKeyLeft: Label1.Caption = "Izquierda" Case vbKeyUp: Label1.Caption = "Arriba " Case vbKeyDown: Label1.Caption = "Abajo" Case vbKeyRight: Label1.Caption = "Derecha" End Select End If Next End Sub
SERVIDOR:
Código
Private Sub Form_Load() With Winsock1 .Close .LocalPort = "1660" .Listen End With End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim dat As String Winsock1.GetData dat, vbString Label1 = dat & vbCrLf End Sub
Espero que me puedan ayudar.