I would like my login form to display a message when the user logging in
pressed the CAPSLOCK key when he is entering data in the password textbox.
I tried using this code on Keypress Event
If KeyAscii >= 65 And KeyAscii <= 90 Then
txtPass.Locked = True
Msgbox "CAPSLOCK Pressed."
Else
txtPass.Locked = False
End If
but doesn't work when I tried it.
I also see some codes like GetKeyboardState API but I don't really know
how to use that. :$
Thanks in advance.
Code snippet much appreciated.