添加输入掩码 [英] Adding a input mask
本文介绍了添加输入掩码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只需要允许数字放入文本框
-
干杯,
Crirus
------------------------------
如果工作是好的,老板会从你那里拿走这一切
--------------------------- ---
I need to allow only numbers into a text box
--
Cheers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
推荐答案
在KeyPress EventDim中作为字符串
ch = Chr
In the KeyPress EventDim ch As String
ch = Chr
(KeyAscii)
如果不是(ch> =" 0"和ch< =" 9")那么
''取消
KeyAscii = 0
结束IfRegards - OHM #Crirus写道:
(KeyAscii)
If Not (ch >= "0" And ch <= "9") Then
'' Cancel
KeyAscii = 0
End IfRegards - OHM#Crirus wrote:
我只需要允许数字放入文本框
I need to allow only numbers into a text box
问候 - OHM#在********* *@BTInternet.com
" One Handed Man [OHM#]" <有关********** @ BTInternet.com> schrieb
"One Handed Man [ OHM# ]" <On**********@BTInternet.com> schrieb
在KeyPress中,EventDim ch as String
ch = Chr
In the KeyPress EventDim ch As String
ch = Chr
这篇关于添加输入掩码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文