how to make the textbox write just numbers in visual basic? | Programming, .NET, Silverlight & More

how to make the textbox write just numbers in visual basic?

hi,
i want to make textbox writes just numbers i used this code in the form application
e.handeled = not char.isnumbers(e.keychar)
and it is working very good but in the WPF application this does not work because it is not supported this event
if you know the answer for the wpf app then help with it and if you don’t know then tell me the windows form code (any code you know about this event))
thanks

In the keydown event, check the character and, if it’s not a number, set the value to 0.

No TweetBacks yet. (Be the first to Tweet this post)

One Response

  1. Colanth Says:

    In the keydown event, check the character and, if it’s not a number, set the value to 0.
    References :

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.