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
Related articles
Related discussion
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
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...
hello
don't you think that the code needs more comments
or some text file to make it clear to readers
specially the beginners
ToTo![Big Smile [:D]](/emoticons/emotion-2a.gif)
This thread is for discussions of Messanger Client Coding.