Private Sub ComboBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown If ComboBox1.Items.Count > 0 Then If e.KeyCode = Keys.Delete Then ComboBox1.Items.Remove(ComboBox1.SelectedItem) 'or 'ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex) End If End If End Sub
I declare If ComboBox1.SelectedIndex > 0 Then Can not delete the first value
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)