Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then SendKeys.Send("{TAB}")
End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
tb = TextBox1.TabIndex
Dim c As New Control
For Each c In Me.Controls
If c.TabIndex = tb + 1 Then
c.Focus()
Exit Sub
End If
Next
End If
End Sub