returns an integer that corresponds to an
index value of an image in ImageList1 while:
gives you the index of an image in ImageList2.
After items have been added to a list, you may have a need to find one or more
of those items. The FindItem method of the ListView
control enables you to search through the items and return the desired
ListItem object. FindItem has the following
ListView1.FindItem (string, value,
The string argument, which is required, specifies
the string for which you are searching in the
list. The value argument tells Visual Basic how
to search for the string. Value can be one of
lvwText (0) Search for the String argument in the
Text property of the ListItems.
lvwSubItem (1) Search for
the String argument in the sub-items of the
lvwTag (2) Search for the String argument in the
Tag property of the ListItems.
The Index argument can be used to indicate the start position for the search.
This argument can have either an integer or a string value. If the value is an
integer, Visual Basic starts the search at the ListItem with
an Index of that value. If the argument is a string, the search begins at the
item having the same Key value as the argument value. If the Index argument is
not specified, the search starts at the first item in the list.
The final argument, match, determines how Visual Basic will select a
ListItem that matches the string argument. Match can have the following
lvwWholeWord (0) A match occurs if the String argument matches
the whole word that starts the Text property of the
lvwPartial (1) A match occurs if the String argument matches
the beginning of the Text property regardless of whether
it is the whole word.
ListView Control topics