Library code snippets

Messenger Client Coding

Messenger Client Coding

  

'Frm client coding
Private Sub Cmd_Send_Click()
On Error GoTo Ex
If Len(Txt_Cli_Msg.Text) > 0 Then
 'Txt_Show_Msg.Text = Txt_Show_Msg.Text + vbCrLf + Trim(Txt_Cli_Msg.Text)
 TcpClient.SendData frmClient.Caption + " : " + Txt_Cli_Msg.Text
 Txt_Cli_Msg.Text = ""
End If
Exit Sub
Ex:
  MsgBox "Server is in offline"
End Sub
Private Sub Form_Load()
 TcpClient.RemoteHost = "PAN1"
 TcpClient.RemotePort = 1002
 TcpClient.Connect
 Unload frmLogin
End Sub<
Private Sub TcpClient_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
TcpClient.GetData strData
Txt_Show_Msg.Text = Txt_Show_Msg.Text + vbCrLf + strData
End Sub
Private Sub Txt_Cli_Msg_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
  Call Cmd_Send_Click
End If
End Sub
'Frm Login Coding Private Sub Cmd_Log_Click()
If Len(Txt_Usr.Text) > 0 Then
 frmClient.Caption = Trim(Txt_Usr.Text)
 frmClient.Show
 Unload Me
Else
 MsgBox "Enter User ...."
 Txt_Usr.SetFocus
End If
End Sub

Comments

  1. 02 Jul 2006 at 12:00

    hello

    don't you think that the code needs more comments

    or  some text file to make it clear to readers

    specially the beginners

    ToToBig Smile [:D]

  2. 01 Jan 1999 at 00:00

    This thread is for discussions of Messanger Client Coding.

Leave a comment

Sign in or Join us (it's free).

Hari K I am Hari, TL in a Pvt Firm. I have knowledge in Dot Net, WM, VB6, Visual Foxpro, Foxpro, SQL Server, Oracle, Access, DBase and Crystal Report.

Related discussion

Related podcasts

  • Christian Beauclair

    14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...

Want to stay in touch with what's going on? Follow us on twitter!