ok im trying to get count users from list to work, I can only get hone channel to work for some reason tho, but heres the code
[\code]
lchan.Text = ChannelName & " (" & lvChannel.ListItems.Count & ")"
im not sure why it dont work....
u need to put on user joins,leaves,userin channel
lchan.Text = ""
lchan.Text = lchan.Text & " (" & lvChannel.ListItems.Count & ")"
A very simple way to do it, a better way is to have another textbox to hold the channelname also on your channel join.
exp
lchan.Text = ""
lchan.Text = NewtxtBox.Text & " (" & lvChannel.ListItems.Count & ")"
this would be Channeljoined (any#)
If lchan is a label, you need to use the Caption property to edit its text.
Quote from: Stealth on June 10, 2003, 08:06 PM
If lchan is a label, you need to use the Caption property to edit its text.
he said he gets the hone channel to work 'home
so i think its not a label.
you dont need to set it to "" first
Alright I did exacly what u told me, but its still kinda messed up
Problems:
Counts all the users but 1.
When user joins -1
When user Leaves +1
Kinda weird but im not sure what i should do...
Quote from: TeEhEiMaN on June 11, 2003, 07:10 PM
When user joins -1
When user Leaves +1
maybe switch the codes in each event...Join and Leave...
Quote from: TeEhEiMaN on June 10, 2003, 07:28 PM
ok im trying to get count users from list to work, I can only get hone channel to work for some reason tho, but heres the code
[\code]
lchan.Text = ChannelName & " (" & lvChannel.ListItems.Count & ")"
im not sure why it dont work....
At least he tried. +1
what would switchin the same code do?.....
Is it because the index of listboxes/views start with a 0 perhaps? If the Count starts at 0, the first name in the list = 0 not 1.
:P
Quote from: Eternal on June 18, 2003, 10:50 AM
Is it because the index of listboxes/views start with a 0 perhaps? If the Count starts at 0, the first name in the list = 0 not 1.
:P
no. if the count is zero, the list is empty. otherwise it wouldnt be able to speicify zero entries. besides, vb isn't zero-based.
Hmm, I thought they started at -1?
Quote from: Eternal on June 18, 2003, 06:16 PM
Hmm, I thought they started at -1?
Win32 ListBoxes use -1 to mean 'no item' - however, they index items starting at 0. Of course, "VB ListBoxes" could differ in how they present methods to the user.
When dealing with ListViews, however, 0 means no items; they begin at 1.
God bless VB.
Yes, enjoy diversity within one language.
Well, that's Microsoft for you...
Quote from: Yoni on June 18, 2003, 11:05 PM
Yes, enjoy diversity within one language.
yeah, it's like if one were to take a bunch of white people and a bunch of black people and put them on an island. with cameras. everywhere. said one would be rich! it's iron-tast-ic!
[edit] by the way, i appoligize if i offended anybody; i'm just white trash, you know! :)
I'm quite offended you did not use any from the Czech culture, myself and my fellow People of the Czech would like this instance FIXED!!
btw j/k, I understand your point to it though