Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Textbox key down event to check for number and letter and decimal

Hello,
I have a function to do a check on keydown event of a textbox ,
how can I have it for only letters,numbers and decimal points
  Public Sub GenericTextBoxFilter(sender As Object, e As KeyEventArgs)
        If TypeOf sender Is RadTextBox Then
            Dim tb = DirectCast(sender, RadTextBox)
            MessageBox.Show(e.KeyValue.ToString())
            If (e.KeyValue.ToString()) = 192 Then
                e.SuppressKeyPress = True
                e.Handled = True
            End If
        End If
    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks Andy as always!