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

[RESOLVED] doogle need your help

$
0
0
hi doogle am trying to add my list to lstChatRoomList in server

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

Viewing all articles
Browse latest Browse all 21273

Trending Articles



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