hi doogle am trying to add my list to lstChatRoomList in server
current working button code for single room add
and now here is the modified button code i made
added list4 in project and contains room list , room1,room2,room3 etc
this adds all room list from list4 to lstChatRoomList but when i login via chat client i se lots of room1 duplicates
current working button code for single room add
Code:
Dim NewChatRoom As New ChatRoom
NewChatRoom.RoomName = InputBox("Enter new Chat Room Name:", "Add a New Chat Room")
'lstChatRoomList.AddItem NewChatRoom.RoomName 'doogle
lstChatRoomList.AddItem NewChatRoom.RoomName & "(0)" 'doogle
ChatRooms.Add NewChatRoom, NewChatRoom.RoomName
UpdateChatRoomListAll
and now here is the modified button code i made
added list4 in project and contains room list , room1,room2,room3 etc
Code:
Dim NewChatRoom As New ChatRoom
Dim i As Integer
For i = List4.ListCount - 1 To 0 Step -1
NewChatRoom.RoomName = List4.List(i)
'lstChatRoomList.AddItem NewChatRoom.RoomName
lstChatRoomList.AddItem NewChatRoom.RoomName & "(0)" 'doogle
ChatRooms.Add NewChatRoom, NewChatRoom.RoomName
Next i
UpdateChatRoomListAll
this adds all room list from list4 to lstChatRoomList but when i login via chat client i se lots of room1 duplicates