If I understand your question correctly, you want to prevent the selected item in the combobox from changing.
If this is correct, then set the
Handled
property to true in your code. Consider the following example:
Private Sub ComboBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.Down Then
Me.SelectNextControl(CType(sender, Control), False, True, True, True)
e.Handled = True
End If
End Sub
And the same goes with textbox
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Left Then
Me.SelectNextControl(CType(sender, Control), False, True, True, True)
e.Handled = True
End If
End Sub
Addition
----------
Wire events in code
For example in Form_Loaded event, wire all the events as follows
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For Each mycontrol As Control In Me.Controls
If TypeOf mycontrol Is TextBox Or TypeOf mycontrol Is ComboBox Then
AddHandler mycontrol.KeyUp, AddressOf GeneralKeyUpHandler
End If
Next
End Sub
and the event handler could look like
Private Sub GeneralKeyUpHandler(sender As Object, e As KeyEventArgs)
If e.KeyCode = Keys.Left Then
Me.SelectNextControl(CType(sender, Control), False, True, True, True)
e.Handled = True
End If
End Sub