Username: Password: oppure
Visual Chat v.1.0 - Client.frm

Client.frm

Caricato da:
Scarica il programma completo

  1. Option Explicit
  2.  
  3. Private Sub Command1_Click()
  4. AboutHelp.Show 1
  5. End Sub
  6.  
  7. Private Sub Command2_Click()
  8. txtOut.Text = "Connessione Terminata"
  9. wskClient.SendData txtOut.Text & vbCrLf
  10. End
  11. End Sub
  12.  
  13. Public Sub Connetti_Click()
  14.     txtReply.Text = txtReply.Text & "Connessione in corso..."
  15.     txtReply.SelStart = Len(txtReply.Text)
  16.     wskClient.Close
  17.     wskClient.LocalPort = 0
  18.     wskClient.Connect txtHostName.Text, 2000
  19. End Sub
  20.  
  21. Private Sub wskClient_DataArrival(ByVal bytesTotal As Long)
  22.     Dim DATI As String
  23.     wskClient.GetData DATI
  24.     txtReply.Text = txtReply.Text & DATI & vbCrLf
  25.     txtReply.SelStart = Len(txtReply.Text)
  26. End Sub
  27.  
  28. Private Sub Invia_Click()
  29.     If wskClient.State <> sckConnected Then
  30.         txtReply.Text = txtReply.Text & "Non connesso"
  31.         txtReply.SelStart = Len(txtReply.Text)
  32.         Exit Sub
  33.     End If
  34.     wskClient.SendData txtOut.Text & vbCrLf
  35. End Sub