Computer Science Canada

Help Needed, Like Now

Author:  Fevian [ Thu Mar 01, 2007 12:12 pm ]
Post subject:  Help Needed, Like Now

Alright. Sorry if I sounded rude, but I need help extremely fast. How do I get a Textbox in VB to accept ONLY numerics? That's really all I need. If I think of anything, else, I'll let you know.

Author:  Fevian [ Thu Mar 01, 2007 12:59 pm ]
Post subject:  RE:Help Needed, Like Now

Well, I got this under control, but I cannot backspace in my textbox now, which I don't care.
code:

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress

        If Char.IsNumber(e.KeyChar) Then

            e.Handled = False

        Else

            e.Handled = True

        End If

    End Sub

Author:  Fevian [ Thu Mar 01, 2007 2:42 pm ]
Post subject:  RE:Help Needed, Like Now

Don't need help anymore. Topic closed?


: