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

[RESOLVED] winsock help chat urgent

$
0
0
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.

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

Viewing all articles
Browse latest Browse all 21986

Trending Articles



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