Searched quite abit for some info that is pertinent to adding a User list to a chat program and coming up pretty much empty. Found a chat program that uses a list box and lists users, but wasn't able to figure out how he was doin what he was doin.
What I want to do is add a list box and then when people connect have it display their name in the list box and when they disconn remove that name from list.
So far I have the list box made and can get the user name to appear on the local machine, but not the remote machine.
What I need is a starting point to learn this, I am hoping that someone more familiar with the search terms and such used might be able to do a better search than I can and help me with that starting point. I have been following along with tutorials but can't find one that deals with this. Hope Im not asking to much, thanks for any replies.
'once this sub is called basically it sends each name from the serverlist one by one to the client.
Public Sub UpdatePlayerList()
On Error Resume Next
Dim a As Integer
Dim Msg As String
Msg = Chr$(254) & Chr$(3)
For a = 1 To MaxUsers
If User(a).Status = "Playing" And _
User(a).UserGUID <> "" Then
Msg = Msg & User(a).HomeAbv & "<" & User(a).UName & ">" & Chr$(1)
End If
Next a
For a = 1 To MaxUsers
If User(a).Status = "Playing" Then
frmMain.wsk(a).SendData Msg & Chr$(0)
DoEvents
End If
Next a
ok here i just made a chatroom program that should help you a little to get an idea of how to make a userlist ok heres the link look at bottom replies and download the zip .
Thanks for the replies guys, not having much luck with anything so far. I'm going to attach what I have and maybe some one is bored enough to take a look at it and provide some feedback. **WARNING**It's not pretty code...
here ill ad the userlist to your project and ill make sure it works good!
You take as much time as you like Sean, I really appreciate the extra effort on your part. I think you should prob be able to follow the logic up until the part where I tried to handle the list names part.
I have very thick skin so please feel free to let me know what I need to improve on. I would rather start doing it the right way as opposed to pickin up bad programming habits and then trying to relearn the "right" way to code. Most the code isn't mine, it was copied from different tutorials and source code I have found on the net and then tweaked to work for me. Thnx again fer the time yer spending on this, looking forward to finding out how to do the list name thingy.
I've added a fully functional user list that updates and lists all users connected.
you may need to fix some connection things but i only added and didn't take things out. Hope you like the help.
P.S Please rate my for i have never been rated for my help. :P
Coding's a Breeze if you'r at ease! GOD THATS CORNY!! -