I have a login form which has two textboxes. Now when the username textbox gets focus i want to find out if the caps lock key is turned. Right now I am using the following code to see if it is turned on, but it doesnt work:
Code:If (Control.ModifierKeys And Keys.CapsLock) = Keys.CapsLock Then ttLogin.SetToolTip(Me.txtUsername, "Your Caps Lock key is turned On") End If




Reply With Quote