Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim c As Char = e.KeyChar.ToString()
If System.Text.RegularExpressions.Regex.IsMatch(c, "[A-Za-z]", System.Text.RegularExpressions.RegexOptions.IgnoreCase) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub tb_Lname_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tb_Lname.KeyPress
Select Case Asc(e.KeyChar)
Case 48 To 57
e.Handled = True
Case Else
End Select
End Sub ' เช็ดการใส่ข้อมูลนามสกุล ใหเป็นตัวอักษรเท่านั้น
Private Sub tb_Price_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tb_Price.KeyPress
btn_Receive.Enabled = True
Select Case Asc(e.KeyChar)
Case 58 To 126
e.Handled = True
Case Else
End Select