Private Sub txtAccommadate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt可住人数.KeyPress
If Char.IsDigit(e.KeyChar) Or e.KeyChar = Chr(8) Then '限制输入为数字和退格键 chr(8) 代表 退格键
Else
e.Handled = True
lblMsg.Text = "请输入数字"
txt可住人数.Focus()
End If
End Sub