Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21946

chat , friends online or offline help

$
0
0
from client i have treeview1 that has all contacts and i use this code out to server to send treeview1 list to server to check if that user is connected


client
this sends out treeview1 all user names to server
Code:

Private Sub Command8_Click()
Dim I As Integer
On Error GoTo 1
For I = 1 To VcUsers.Nodes.Count
frmMain.ConnSocket.SendData VcUsers.Nodes(I).Text & "|updateonlinene|"
1:
Next I
End Sub

client sends usenames to server
jhon
billy
sarah





server



Code:

If InStr(tempString, "|updateonlinene|") Then
    tempString = Replace(tempString, Chr(12), "")
    tempString = Replace(tempString, Chr(13), "")
tempString = Replace(tempString, "|updateonlinene|", "" & vbCrLf)
Text13.Text = tempString
End If


server now adds
jhon
billy
sarah

to text13.text list format .


lstAllUsers is the listbox that has all connected users in server

how do i compare text13.text with lstAllUsers and
add offline users in list1 and online users on list2 in server

Viewing all articles
Browse latest Browse all 21946

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>