开发者

Highlight numeric characters in a maskedtextbox

开发者 https://www.devze.com 2023-02-24 10:45 出处:网络
I am using a masked text box to allow users to enter a serial number. The problem is that this serial number has to be communicated over the phone and people seem to be having trouble differentiating

I am using a masked text box to allow users to enter a serial number. The problem is that this serial number has to be communicated over the phone and people seem to be having trouble differentiating between O and 0 and I and 1.

I thought that a good solution to this might开发者_JAVA技巧 be some way of highlighting which characters in the textbox were numeric characters (as opposed to alphabetic characters). Obviously there is no way to do this without using a richtextbox and then I lose the masking ability.

Can anyone think of a good solution to this? (Changing the font to one that has a slashed 0 would help but not for I and 1)


Go for a font with a slashed zero and a 1 with serifs. To stop confusing the I with 1, you could use lower case letters to have a dotted i. Better even... avoid 1,0,I and O in your serial numbers...?

0

精彩评论

暂无评论...
验证码 换一张
取 消