Chapter 9 - VB.Net by Schneider
3
Useful Properties of the List
Box
•
For the total number of items in a list
box:
•
lstBox.Items.Count
•
For the index number of the currently
highlighted item:
•
lstBox.SelectedIndex
lstBox.Items.Count-1 is the value of the last subscript (index) because the list starts at 0.
If no item is highlighted, the value of SelectedIndex is –1.