Screenshot
![]()
I am trying to add Country Flag for each user ONLINE in our forum. I am using a Listbox for ONLINE USERS. And a TextBox that Grabs the Country name from Users Profile-Page with button click! (HTTPWEBREQUEST FUNCTION). I used it in my previouse program a proxyip to country flag converter.
How the Program runs:
Button Click 1: The code takes 1 username at a time from LISTBOX1 and adds it to TEXTBOX1!
It will then check Automatically for the country! If the country is found, the country name will be added in TextBOx2.
Button Click2: After the country is found, I have to click a 2nd time to add them in a LISTVIEW where the username and flag will be added (using Imagelist with all country flags in it).
Sometimes, thare are 10 users online at the same time and they are already added in my LISTBOX! But I can only Check 1 User at a time. How can create or do a Re-scan for all the users online Automatically, and add them from ListBox to listview with their country flags!
The Code below is my Function-Code that grabs the country name in textbox(USING HTTPWEBREQUEST):
Its added with my MAIN CODE! By itself...
And the code below here is my main code: (Button click 2)
I will be really appereciated for some help, I have worked hard to get all the stuff working! And this is the last part of my project which keeps me from finishing it! Thanks a lot in advance!

I am trying to add Country Flag for each user ONLINE in our forum. I am using a Listbox for ONLINE USERS. And a TextBox that Grabs the Country name from Users Profile-Page with button click! (HTTPWEBREQUEST FUNCTION). I used it in my previouse program a proxyip to country flag converter.
How the Program runs:
Button Click 1: The code takes 1 username at a time from LISTBOX1 and adds it to TEXTBOX1!
It will then check Automatically for the country! If the country is found, the country name will be added in TextBOx2.
Button Click2: After the country is found, I have to click a 2nd time to add them in a LISTVIEW where the username and flag will be added (using Imagelist with all country flags in it).
Sometimes, thare are 10 users online at the same time and they are already added in my LISTBOX! But I can only Check 1 User at a time. How can create or do a Re-scan for all the users online Automatically, and add them from ListBox to listview with their country flags!
The Code below is my Function-Code that grabs the country name in textbox(USING HTTPWEBREQUEST):
Code:
TextBox2.Text = GetCountry(TextBox1.Text, "country")And the code below here is my main code: (Button click 2)
Code:
For i = 0 To ListBox1.Items.Count - 1
TextBox1.Text = ListView1.Items.Item(i).ToString()
TextBox2.Text = GetUserInfo(TextBox1.Text, "country")
Dim country As String = ListBox2.Text
Dim s As Integer = 0
'I assume the problem is with the line below
Do Until s = ListView1.Items.Count - 1
Dim country As String = TextBox2.Text + ".png"
ListView1.Items.Item(s).ImageKey = country
s += 1
Loop
Next