title: How to check a checkbox when caps lock key is pressed in vb .net
body: <p>I trying to develop a program using vb .net that could check or uncheck a check box when the caps lock key is pressed. I used the below code to do the same, but its not working.</p>
  
  <pre><code>Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
      If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.CapsLock) Then
          checkbutton_caps.Checked = True
      End If
  </code></pre>
  
  <p>So what's wrong with the above code?</p>