ลองใช้ function IsNumeric() ตอนที่ OnChange Textbox ครับ
Date :
2011-12-14 18:11:27
By :
webmaster
No. 2
Guest
Code (VB.NET)
Private Sub txtrate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtrate.KeyPress
Dim KeyAscii As Short = Asc(e.KeyChar)
Select Case KeyAscii
Case 48 To 57
e.Handled = False
Case 8, 13, 46
e.Handled = False
Case Else
e.Handled = True
End Select
End Sub