by Dinesh Thakur Category: Lists Loops and Printing

ListCount :


The application uses the list count property of listbox to store the number of item in the list. ListCount is always one more than the highest list index, since list index begins with zero.


Ex. totalItem = lstItem.listCount

ListIndex :


When a project is running and the user selects an item from the list, the index number of that item is stored in the listIndex property of the listbox. The listindex of the first item in the list is zero. If no list item is selected , the list index property set to -1. We can use listIndex property to select an item in list or deselect all items in code.


Ex. lstCopyType.listIndex = 3

lstCopyType.listIndex = -1

„Deselect all items in list.


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.