Listview help
Posted: Wed Aug 22, 2012 10:36 pm
Right I have a list view and I am adding info to it with a button like this
soo say I have 7 labels on my form all with different numbers is there any way to see if an item in my listview contains
any of these numbers and display the username "richardjmanning" of the user that has the most numbers
If it helps its for a lotto system the man hits the button to add a user and then when ready to pick a winner hit another button that make the labels go to random number from 1 to 100 and I want to see what 5 users are clostest to the win
Code: Select all
But I want it to add new line every time but it doesnot it add a new richardjmanning but no new random numbers why is this and also is there a way to compare weather a list view contains numbers ListView1.Items.Add("richardjmanning")
ListView1.Items(0).SubItems.Add(ram.Next(0, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(1, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(2, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(3, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(4, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(5, ListBox2.Items.Count))
ListView1.Items(0).SubItems.Add(ram.Next(6, ListBox2.Items.Count))
soo say I have 7 labels on my form all with different numbers is there any way to see if an item in my listview contains
any of these numbers and display the username "richardjmanning" of the user that has the most numbers
If it helps its for a lotto system the man hits the button to add a user and then when ready to pick a winner hit another button that make the labels go to random number from 1 to 100 and I want to see what 5 users are clostest to the win