第1个回答 2016-11-24
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Select Case Asc(e.KeyChar)
Case 8, 45, 46 '退格,负号,小数点
Case 48 To 57 '0~9
Case Else
e.KeyChar = ""
End Select
End Sub本回答被网友采纳