lucholano22 de Agosto del 2005
Preguntahola, mi problema es el siguiente:
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8
Case Is < 48, Is > 57
KeyAscii = 0
End Select
End Sub
El codigo de arriba me permite solo ingresar numeros en el TextBox text1 utilizando el evento KeyPress.
Pero el problema que tengo es: como hago esto en el evento KeyDown, he intentado con el siguiente codigo:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 8
Case Is < 48, Is > 57
KeyCode = 0
End Select
End Sub
Pero no pasa nada. El problema creo que esta en el "KeyCode=0".
No se alguien me pude ayudar.
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 8
Case Is < 48, Is > 57
KeyAscii = 0
End Select
End Sub
El codigo de arriba me permite solo ingresar numeros en el TextBox text1 utilizando el evento KeyPress.
Pero el problema que tengo es: como hago esto en el evento KeyDown, he intentado con el siguiente codigo:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 8
Case Is < 48, Is > 57
KeyCode = 0
End Select
End Sub
Pero no pasa nada. El problema creo que esta en el "KeyCode=0".
No se alguien me pude ayudar.
