ListBox Double-Click Event
01/18/2016
|
0:05:01
Implementing a double-click event for a ListBox. Shell program available at http://bowerpower.net/compprog1/vb05/LBoxDblClk.zip
ListBox Double-Click Event
Created: 01/18/2016
0:00:14
In design time, double-clicking on a ListBox creates a CheckChanged event... but that's not what we want this time.
0:00:25
Selecting from a list of controls/objects, then selecting from all the possible events for that control/object
0:00:50
Use .SelectedItem to display what was double-clicked
0:01:38
Use .SelectedIndex to display the index/position of what was double-clicked
0:02:32
Un-select items by setting .SelectedIndex = -1
0:03:22
Use .Items.Count property to make sure the ListBox isn't empty (can't get .SelectedItem or .SelectedIndex if there are no items in the ListBox - the program will crash)