1、在代码中引用相应的空间
Imports System.Text.RegularExpressions
2、在控件的KeyPress控件中,输入如下代码
Private Sub tSchool_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tSchool.KeyPress
Dim guze As Regex
guze = New Regex("^[/u4e00-/u9fa5]+$")
If Not (guze.IsMatch(e.KeyChar) Or Char.IsControl(e.KeyChar)) Then
e.Handled = True
End If
End Sub