Salut, voila je voulais savoir si qqun utilisais ce freeware, qui permet de faire des appli client serveur en vb,...
je l'ai telechargé hier, mais rien a faire, j'ai suivi le premier exemple tout simple decrit dans le .DOC fourni avec ( le tutorial en anglais koi ) mais ca passe pas : voici le code que j'ai mis :
Private Sub Form_Load()
Socket1.AddressFamily = AF_INET
Socket1.Protocol = IPPROTO_IP
Socket1.SocketType = SOCK_STREAM
Socket1.Binary = False
Socket1.Blocking = False
Socket1.BufferSize = 1024
End Sub
Private Sub Command1_Click()
On Error GoTo Failed
Socket1.HostName = Trim$(Text1.Text)
Socket1.RemotePort = IPPORT_ECHO
Socket1.Action = SOCKET_CONNECT
Exit Sub
Failed:
MsgBox "Unable to connect to remote host"
Exit Sub
End Sub
Private Sub Socket1_Connect()
Text2.Enabled = True
Text3.Enabled = True
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Socket1.SendLen = Len(Text2.Text)
Socket1.SendData = Text2.Text
KeyAscii = 0: Text2.Text = ""
End If
End Sub
Private Sub Socket1_Read(DataLength As Integer, IsUrgent As Integer)
Dim strBuffer As String
Socket1.Read strBuffer, DataLength
Text3.Text = strBuffer
End Sub
Sub Form_Unload(Cancel As Integer)
If Socket1.Connected Then Socket1.Action = SOCKET_CLOSE
End
End Sub |
et le champ text3.text ne se remplis pas... bref ca marche pas, si qqun aurait un exemple sous la main, merci d'avance :'(
a+