Senin, 14 Mei 2012

Contoh Source code Validasi Input TextBoxt Visual Basic

Posted by By4n_Nur4 14.10, under | No comments

Setelah di artikel sebelumnya saya memberikan sedikit contoh tetang validasi input text pada php, dan validasi input text pada visual basic yang hanya bisa di input dengan huruf, di sini saya berikat untuk contoh source code mengenai validasi input text di visual basic,silahkan kalian download contoh source code nya : Untuk penampakan

 
 
Berikut Source code nya :
  1. Private Sub txthufur_KeyPress(KeyAscii As Integer)  
  2.     If KeyAscii >= 65 And KeyAscii <= 90 Then  
  3.         KeyAscii = KeyAscii  
  4.     Else  
  5.         If KeyAscii >= 97 And KeyAscii <= 122 Then  
  6.             KeyAscii = KeyAscii  
  7.         Else  
  8.             KeyAscii = 0  
  9.         End If  
  10.     End If  
  11. End Sub  
  12.   
  13. Private Sub txtkapital_KeyPress(KeyAscii As Integer)  
  14.     KeyAscii = Asc(UCase(Chr(KeyAscii)))  
  15. End Sub  
  16.   
  17. Private Sub txtangka_KeyPress(KeyAscii As Integer)  
  18.     If KeyAscii >= 48 And KeyAscii <= 57 Then  
  19.         KeyAscii = KeyAscii  
  20.     Else  
  21.         KeyAscii = 0  
  22.     End If  
  23. End Sub 

0 komentar:

Posting Komentar