[此贴子已经被Joforn于2007-7-4 23:42:08编辑过]
淘宝 毛绒玩具 熊
jstbobo.taobao. com
久顺通啵啵玩具店
现在这个不包括 科学计数法
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case Trim(Text1)
Case "+", "-"
If InStr("0123456789", Chr(KeyAscii)) > 0 Then
Else
If Strings.InStr("3,13,8,24,26", KeyAscii) = 0 Then KeyAscii = 0
End If
Case "+0", "-0"
If KeyAscii = 46 Then
Else
If Strings.InStr("3,13,8,24,26", KeyAscii) = 0 Then KeyAscii = 0
End If
Case Else
If InStr(Trim(Text1), Chr(46)) > 0 Then
If InStr("0123456789", Chr(KeyAscii)) > 0 Then
Else
If Strings.InStr("3,13,8,24,26", KeyAscii) = 0 Then KeyAscii = 0
End If
Else
If InStr("0123456789.", Chr(KeyAscii)) > 0 Then
Else
If Strings.InStr("3,13,8,24,26", KeyAscii) = 0 Then KeyAscii = 0
End If
End If
End Select
End Sub
其中 3是复制 13是回车 8是backspace24是剪切 26是撤消
[此贴子已经被作者于2007-7-5 10:38:44编辑过]