跪求一段VB代码,textbox只能输入数字,小数点,负号
VB 6.0
textbox里,只能输入数字,小数点,负号
参考答案:Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim n As Integer, a As String
If Not IsNumeric(Chr(KeyAscii)) And Chr(KeyAscii) <> "." And Chr(KeyAscii) <> "-" Then
KeyAscii = 0
End If
End Sub
这样删除只能用DELETE
如果想用其他可以自己加