With Deft Fingers, "ItsMe" <it*******@yahoo.com> wrote:
I want to control the user using character keys in a numeric text box. So,
I'm differentiating with Tag Property, I'm storing Tag Value = "I" for
integer, "F" for currency/float.
If I am reading you right, try playing with this... I had a TextBox in which I
wanted the user to ONLY enter numbers. Nothing else. This does the trick.
You will just have to play with the AscW(e.KeyChar) values somewhat.
Private Sub tbxCblDist_KeyPress(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles tbxCblDist.KeyPress
' Allow ONLY Numeric Entries
If ((AscW(e.KeyChar) < 48) Or (AscW(e.KeyChar) > 57)) And Not _
(AscW(e.KeyChar) = 8) Then e.Handled = True
End Sub
Hopefully this is usefull.
Regards,
Bruce