Y
yxq
Hello,
I have a main form, there other some controls(i.e. textbox) in the form.
I want to detect whether Caps Lock key is pressed in form-key event.
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode = 20 Then
MessageBox.Show("Caps Lock is pressed!")
End If
End Sub
But the code will not work, how to do? I guess the other controls accepted
the key?
Thank you
I have a main form, there other some controls(i.e. textbox) in the form.
I want to detect whether Caps Lock key is pressed in form-key event.
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode = 20 Then
MessageBox.Show("Caps Lock is pressed!")
End If
End Sub
But the code will not work, how to do? I guess the other controls accepted
the key?
Thank you