''开初,我还是到网上看到了如下过程
'''''Private Sub Text1_KeyPress(KeyAscii As Integer)
'''''If (Chr(KeyAscii) > "9" Or Chr(KeyAscii) < "0") And Chr(KeyAscii) <> "." Then
'''''KeyAscii = 0
'''''End If
'''''End Sub
''看完之后,加以实验,发现没有退格键的功能
''经过我的完善之后,现在有了退格功能
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii < 8 Or (KeyAscii > 8 And KeyAscii < 48) Or KeyAscii > 57) And Chr(KeyAscii) <> "." Then
KeyAscii = 0
End If
End Sub
[本日志由 admin 于 2013-11-01 10:41 PM 编辑]
引用通告地址 (0):
http://www.cnng.net/blog/trackback.asp?tbID=7
http://www.cnng.net/blog/trackback.asp?tbID=7&CP=GBK
http://www.cnng.net/blog/trackback.asp?tbID=7
http://www.cnng.net/blog/trackback.asp?tbID=7&CP=GBK