Apostar y ganar

Click Now!

viernes, 1 de noviembre de 2013

Función para recibir solo números texboxes

Funcion para recibir solo numeros texboxes


Dim Número As Double    <------------declarar

funcion


Public Sub solonumeros(ByRef e As System.Windows.Forms.KeyPressEventArgs)

        If Char.IsDigit(e.KeyChar) Then
            e.Handled = False
        ElseIf Char.IsControl(e.KeyChar) Then
            e.Handled = False
        ElseIf Char.IsSeparator(e.KeyChar) Then
            e.Handled = False
        Else
            e.Handled = True
        End If

    End Sub


Poner en cada tex keypres

solonumeros(e)