title: Detect if CTRL key is pressed when Left Click on DataGridView Header
body: <p>I have created a class in VB.Net that is a child of <code>DataGridView</code>.  I am trying to create a method that detects when there has been a left click on one of the column headers, and then checks to see if the CTRL key is pressed when the click event fires.  This is the code I have so far:</p>
  
  <pre><code>Private Sub Self_ColumnHeaderLeftClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles Me.ColumnHeaderMouseClick
      If e.Button &lt;&gt; MouseButtons.Left Then Return
      If (Control.ModifierKeys = (Keys.LControlKey Or Keys.RControlKey) Then
          MessageBox.Show(Columns(e.ColumnIndex).Name)
      EndIf
  End Sub
  </code></pre>
  
  <p>It's suppose to be simple right now, and just pop up a message box when holding either CTRL key and left clicking on one of the headers.  However nothing is happened.  I know the event method is firing, because if I move the <code>MessageBox</code> line into an <code>Else</code> block under the <code>If</code> statement, I get the message boxes appearing.  What am I doing wrong?</p>