I've nearly completed the migration of my first ListBox control to a
ListView in detail view, and I'm only experiencing one problem:
My ListBox.SelectedIndexChanged procedure began as follows:
NextPointID = ListBox_Points.SelectedIndex + 1
The equivalent of that command for a ListView would seem to be:
NextPointID = ListView_Points.SelectedIndices(0) + 1
Since my ListView doesn't allow multiselect, the first (0th) SelectedIndex
in the collection would always be the only member, correct?
A single execution of that line of code works perfectly, but if I attempt
to choose another index, it returns the following error:
---
An unhandled exception of type 'System.ArgumentOutOfRangeException'
occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of valid
values.
---
So, what's the sitch? What'd I do wrong?
Thanks in advance for any assistance,
The Confessor