Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/01/2005, 15:15
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años
Puntos: 50
Sería mas o menos así:

Cita:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim KeyAscii As Integer
KeyAscii = filtroEntero(Asc(e.KeyChar))
End Sub
Public Function filtroEntero(ByVal KeyAscii As Integer)
If KeyAscii <> 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
Return 0
Else
Return KeyAscii
End If
Else
Return 8
End If
End Function
Ya sería cosa de adaptarlo a lo que necesitas pero esa es la idea general.

Espero que te sirva.

Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net