Hi every 1
I have two comboBoxes that are filled with some items. I just want to select an item from comboBox1 and then press the Enter key on my keyboard and then set the focus to the comboBox2. I`ve tried these two ways bellow but without no success :
Private Sub comboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles comboBox1.KeyPress
1st way :
If e.KeyChar = "{ENTER}" Then
My.Computer.Keyboard.SendKeys("{TAB}")
End If
2nd way :
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
Me.comboBox2.Focus()
End If
End Sub
PLS F1 Me
I have two comboBoxes that are filled with some items. I just want to select an item from comboBox1 and then press the Enter key on my keyboard and then set the focus to the comboBox2. I`ve tried these two ways bellow but without no success :
Private Sub comboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles comboBox1.KeyPress
1st way :
If e.KeyChar = "{ENTER}" Then
My.Computer.Keyboard.SendKeys("{TAB}")
End If
2nd way :
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
Me.comboBox2.Focus()
End If
End Sub
PLS F1 Me