VB就是在右边选KeyPress.
delphi 为什么找不到?????'只能输入数字
Private Sub mob2_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 '其他的键入无效并发出Beep声音
KeyAscii = 0
Beep
End Select
End Sub
delphi 为什么找不到?????'只能输入数字
Private Sub mob2_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 '其他的键入无效并发出Beep声音
KeyAscii = 0
Beep
End Select
End Sub
也是要找常数表吗?
OK
接分
abort;
key := #0;