Cordial saludo amigo del foro tengo un pequeño problema tengo con los eventos keypress y enter. tengo un combobox y un DatTmiePicker y cuando presiono enter que quiero pasar a otra casilla no hace nada
aca le dejos el codigo
codigo DatTimePricker
Código:
Private Sub DtpFechaNac_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles DtpFechaNac.Enter
Try
cmbTipo.SelectAll()
Catch ex As Exception
End Try
End Sub
Private Sub DtpFechaNac_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles DtpFechaNac.KeyPress
Try
If e.KeyChar = ChrW(13) Then
Dim evt As New EventArgs
DtpFechaNac_Enter(sender, evt)
e.Handled = True
End If
Catch ex As Exception
End Try
End Sub
codigo combobox
Código:
Private Sub CmbTipoDoc_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbTipoDoc.Enter
CmbTipoDoc.SelectAll()
End Sub
Private Sub CmbTipoDoc_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CmbTipoDoc.KeyPress
If e.KeyChar = ChrW(13) Then
TxtDocumento.Focus()
e.Handled = True
End If
End Sub