Wednesday, December 08, 2010

Setting CAPS LOCK to Text Box di VB 6.0


Berikut contoh kodenya ..

Cara yang pertama :

# Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 97 To 122
KeyAscii = KeyAscii - 32
End Select
End Sub


Cara yang kedua :

Private Sub txtPro_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Mungkin teman-teman ada yang mau nambahin??

Categories: ,

0 comments: