hi alls again need your expert help am stuck please take a look at my image
[IMG][/IMG]
when i first join the chat listview1 adds my line in the listview list with correct username and computer specs etc
but when the second user joins his specs gets replaced on mine making all listview1 specs look same please help.
Private Sub Listen_ConnectionRequest(ByVal requestID As Long)
Dim i As Integer
For i = 1 To lvConnections.ListItems.Count
If Listen.RemoteHostIP = Split(lvConnections.ListItems.Item(i).text, ": ")(1) Then Exit Sub
Next i
For i = 1 To Winsock1.UBound
If Winsock1(i).State <> 7 Then
With Winsock1(i)
.Close
.Accept requestID
lvConnections.ListItems.Add , , i & ": " & Listen.RemoteHostIP, , 1
StatusBar1.Panels(3).text = "Latest Connection " & Listen.RemoteHostIP
End With
Exit Sub
End If
Next i
End Sub
[IMG][/IMG]
when i first join the chat listview1 adds my line in the listview list with correct username and computer specs etc
but when the second user joins his specs gets replaced on mine making all listview1 specs look same please help.
Quote:
Private Sub Listen_ConnectionRequest(ByVal requestID As Long)
Dim i As Integer
For i = 1 To lvConnections.ListItems.Count
If Listen.RemoteHostIP = Split(lvConnections.ListItems.Item(i).text, ": ")(1) Then Exit Sub
Next i
For i = 1 To Winsock1.UBound
If Winsock1(i).State <> 7 Then
With Winsock1(i)
.Close
.Accept requestID
lvConnections.ListItems.Add , , i & ": " & Listen.RemoteHostIP, , 1
StatusBar1.Panels(3).text = "Latest Connection " & Listen.RemoteHostIP
End With
Exit Sub
End If
Next i
End Sub