[原创]请高手指教!
做一个计算器怎么才能在键盘上只输入1------9的数字和点,还有退格键
2005-10-11 11:53
2005-10-12 15:22
2005-10-12 15:40
2005-10-12 15:49
2005-10-12 15:52
2005-10-12 15:55
2005-10-12 16:00
2005-10-13 10:23
2005-10-13 11:09
Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case Asc("0") To Asc("9"), vbKeyBack '允许0~9数字和退格键
Case Asc(".") '允许一个小数点 If InStr(1, Text1.Text, ".") > 0 Then KeyAscii = 0 Case Else KeyAscii = 0 Beep '其他的发出Beep声音 End Select End Sub

2005-10-13 12:35