• Welcome to Valhalla Legends Archive.
 

Vb -> ListView Question

Started by gotcha_ass, February 25, 2003, 07:07 PM

Previous topic - Next topic

gotcha_ass

#15
Oh ok, I wasnt tryin to insult him or anything, just ignorance on my part.

gotcha_ass

#16
I was tried that code, the real simple one MesiaH posted, and it worked at first, but now I am gettin an invalid key error. Any help?

Mesiah / haiseM

#17
when your error raises, hit debug, the line of code should be highlighted yellow, look at it carefully, if you cant figure out whats causing the error, paste it on here.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

gotcha_ass

#18
Its the same simplified code you posted earlier in this thread. The error is invalid key.

Public Sub DelNick(ByVal strKey$)
        frmMain.ChannelUsers.ListItems.Remove frmMain.ChannelUsers.FindItem(strKey$)
End Sub

Mesiah / haiseM

#19
thats your problem, i changed it to delete them by their name, not the key.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Camel

#20
lvUsers.ListItems.Remove lvUsers.FindItem(key).Index

guest

#21
form1.ChannelList.ListItems.add , , username, , icon
form1.ChannelList.ListItems.RemoveĀ form1.ChannelList.FindItem(username).Index

gotcha_ass

#22
Oh my god its still doin it  ??? ??? ???
At least I dont get an error, I wish I could put up a screen shot so I can better explain it. But this is weird.

ILurker

#23
show me the code of how you add items to the list

gotcha_ass

#24
Public Sub AddNick(ByVal strKey$, ByVal strName$, lngIcon&)
    Dim i&
    i = frmMain.ChannelUsers.ListItems.Count + 1
    frmMain.ChannelUsers.ListItems.Add i, strKey, strName, 0, lngIcon
End Sub

ILurker

#25
try doing this under the user_join sub
Dim icon As Integer
icon = GetIconCode(client, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)

 If icon = ICON_GAVEL Then
    With frmMain.ChannelUsers.ListItems.add(1, username, username, , icon)
    .ListSubItems.add , , , lagicoN
    End With
 End If
 If icon <> ICON_GAVEL Then
    With frmMain.ChannelUsers.ListItems.add(, , username, , icon)
    .ListSubItems.add , , , lagicoN
    End With
 End If

This is a code you could use to remove a user from the list.

form1.ChannelList.ListItems.Remove form1.ChannelList.FindItem(username).Index
form1.ChannelList.Refresh


If you're trying to add a lag icon also, you would need to add a "ping as string" in your sub. then use that as i did with mine

Noodlez

#26
why dont you check the flags instead of the icon? also, what about blizz reps and bnet ops?

ILurker

#27
yeah i relized about those this morning,