Visual Basic.NET - Un Procedimiento, varios eventos

 
Vista:
sin imagen de perfil
Val: 43
Ha aumentado 1 puesto en Visual Basic.NET (en relación al último mes)
Gráfica de Visual Basic.NET

Un Procedimiento, varios eventos

Publicado por Celipe (27 intervenciones) el 20/03/2012 11:47:39
Buenas, tengo un problema con el código.
Todo va bien, hasta que pierde el foco el último campo, que no lo pierde.
Espero me puedan ayudar, gracias.

Private Sub LLEGAFOCO(ByVal sender As Object, ByVal e As EventArgs) Handles INI_UNIDIS.GotFocus, INI_NUMEMP.GotFocus, INI_CAMPAN.GotFocus, INI_UNIDIS.LostFocus, INI_NUMEMP.LostFocus, INI_CAMPAN.LostFocus

' Controlo el evento GotFocus y LostFocus de todos los textbox
Dim CUALO As String = CType(sender, TextBox).Name

Select Case CUALO
Case Is = "INI_UNIDIS"
If INI_UNIDIS.Focus() = True Then NE_GOTFOCUS(INI_UNIDIS) Else NE_LOSTFOCUS(INI_UNIDIS)
Case Is = "INI_NUMEMP"
INI_NUMEMP.Text = "01"
If INI_NUMEMP.Focus() = True Then NE_GOTFOCUS(INI_NUMEMP) Else NE_LOSTFOCUS(INI_NUMEMP)
Case Is = "INI_CAMPAN"
If INI_CAMPAN.Focus() = True Then NE_GOTFOCUS(INI_CAMPAN) Else NE_LOSTFOCUS(INI_CAMPAN)
End Select

End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder