Ultrawhack
Well-known member
Thanks ! Can you please tell me how I can clear selected Listbox2.item by hitting the delete key ?
Private Sub ListBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles ListBox1.KeyUp
Dim ix As Integer = ListBox1.SelectedIndex
If e.KeyCode = Keys.Delete And ix <> -1 Then
ListBox1.Items.RemoveAt(ix)
End If
End Sub