I have a listbox which contains items in it. After you click on the selected item, the listbox will be populated with different items relevant to the item which you clicked on.
What I want to make, is instead of having to click on the selected item, I want to press the Enter key when an item is selected, and that way I won't need to click on the items.
This is what I tried for a KeyDown event:
Private Sub ListBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles ListBox1.KeyDown If (e.KeyCode = Keys.Enter) Then ListBox1_SelectedIndexChanged(sender, e) End If End Sub