Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress
Dim c As Char
c = e.KeyChar
If Not Char.IsLetterOrDigit(c) Then
e.Handled = True
Beep()
End If
End Sub
温馨提示:答案为网友推荐,仅供参考