• Advertisement
Sign in to follow this  

Chat program - user list (help!)

This topic is 4787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working on a chat program in VB6. I want to have a dynamically updating user list that updates whenever a client enters/leaves the room. If a client joins/leaves the room, then the current list of who's in there, up to date, should be transmitted to them. Any thoughts on how that would be achieved? Also, I'm having trouble with some code on my server app (client and server are separate apps). When a user joins the room, their name is added to an array called handles(). I want to add their name to a dropdown list (combobox) called lstUsers, but only if it isn't there already. lstUsers is not part of a control array, and here's the broken code:
For X = 0 To UBound(handles)

    If frmMain.lstUsers.Text(X) <> username And frmAdminMessage.lstUsers.Text(X) <> username Then
    frmMain.lstUsers.AddItem username  'variable username is extracted from a received string using the Split function
    frmAdminMessage.lstUsers.AddItem username 'same here
    End If

Next X

I get an error saying "Wrong number of arguments or invalid property assignment" when a client tries to connect, and the debugger highlights the ".Text" part of my first add line. Please help me, this is really starting to irritate me because it should be a simple bug to fix.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement