Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/08/2011, 14:17
Geovanny0401
 
Fecha de Ingreso: diciembre-2009
Mensajes: 137
Antigüedad: 14 años, 4 meses
Puntos: 4
Problema con los eventos

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