windows ce - How do I filter and substitue TextBox characters during input in VB.net 2005 -


i have 2 textbox input fields must numeric only, limited 7 digits. however, target device has tiny keyboard shared numeric keypad accessible via numlock key, key 'e' doubles '1'. problem numlock enabled backspace/del key not work input difficult... fat fingers pushing wrong key, etc...

so automatically convert 'e' '1', 'r' '2', etc, type. don't want see 'e' '1', has numlock pressed. has accept 0..9 if numlock pressed.

substitute these characters: "ertdfgxcvertdfgxcv0123456789" these: "012345678901234567890123456789"

is there easy way in vb.net-2005 ?

you can use event;

private sub textbox1_keypress(sender object, e keypresseventargs) handles textbox1.keypress     dim counter integer = 0     each c char in "ertdfgxcvertdfgxcv"         if e.keychar = c             e.keychar = chr(48 + counter)         end if         counter += 1         if counter = 10 counter = 0     next  end sub 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -