I have created a project that showes our forum users online inside a listbox. The list box refreshes every Second, so if a new user is online, then the user is showen in the Listbox.
But how can I get the Name/Text of the "Last" or the "Latest" Joined in Listbox and add the the users name to a textbox!
Now here is an important thing about this, because some times we have 5 Users Joining at the same time, and I want all the latest 5 to show up in 5 different TextBoxes.....
So far I have this code Here, but it showes the FIRST ITEM on TOP ofcourse:
And my other question is, Do I have to add the code in "ListBox1_SelectedIndexChanged" code?
I will be very happy to know how it can be done with at least 1 to 5 users!
Many thanks in Advance..........
Ps, The point with all of this is that I have created another script that sends a Welcome Message to the Users who just Joined. But I am trying to first figure out how to get the Latest Users names befor. Then it will be easier for me to Send the Message.....
But how can I get the Name/Text of the "Last" or the "Latest" Joined in Listbox and add the the users name to a textbox!
Now here is an important thing about this, because some times we have 5 Users Joining at the same time, and I want all the latest 5 to show up in 5 different TextBoxes.....
So far I have this code Here, but it showes the FIRST ITEM on TOP ofcourse:
Code:
Dim str as String
str = listbox1.Items(listbox1.Items.Count - 1)
TextBox1.Text = str
I will be very happy to know how it can be done with at least 1 to 5 users!
Many thanks in Advance..........
Ps, The point with all of this is that I have created another script that sends a Welcome Message to the Users who just Joined. But I am trying to first figure out how to get the Latest Users names befor. Then it will be easier for me to Send the Message.....