• Welcome to Valhalla Legends Archive.
 

LvChannel Clear?

Started by WiLD, May 24, 2003, 08:24 PM

Previous topic - Next topic

WiLD

Ok  i have recently changed from CB1 > CB2.

I am having problems with my lvChannel. I want it to clear when you join a new channel but it doesnt work. This is what i got so far:
Private Sub CleanSlateBot2_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
   strJSTR = Product
   strSexp = Product
   strSTAR = Product
   strd2 = Product
   strD2XP = Product
   strW2BN = Product
   strw3 = Product
   strDiablo = Product
Dim icon As Integer
icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If icon = ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(1, Username, Username, , icon)
   .ListSubItems.Add lvChannel.FindItem(Username).Index, , , lagicoN
   End With
End If
If icon <> ICON_GAVEL Then
   With Form1.lvChannel.ListItems.Add(, , Username, , icon)
   .ListSubItems.Add , , , lagicoN
   End With
End If
End Sub


That just doesnt seem to work. Says theres somethng wrong with:
With Form1.lvChannel.ListItems.Add(1, Username, Username, , icon)
i havnt tried it with ops yet but i think i get a different error when its got ops.

PS. A solution plz no mumbo jumbo. Thx
=_=  &&  g0dFraY  &&  -=Templar=-  @USWest

Yoni

I find no obvious connection between what you said you're trying to do and the code you pasted.
Care to elaborate?

You probably want to do something like:
Private Sub CleanSlateBot2_WhateverTheEventNameIsForChannelJoin(WhateverParameters)
 lvChannel.Clear
End Sub

UserLoser

lvChannel.Listitems.Clear (Since he's using a listview not a listbox :P)