title: Latency picking up click event
body: <p>I am having a little problem with latency when I check a checkbox on and try to drag and drop. When I select one checkbox and try to move it over it won't move. If I have click that checkbox and click on a different row then try to move it will work. It works the same no matter how many I check it won't get the newest row without clicking somewhere else first. Do I need to add another event to handle or pick up that the box now has been checked? </p>
  
  <pre><code>Private Sub datagridview_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles datagridview.MouseDown
       mouseDownPosition = e.Location
  End Sub
  
  Private Sub datagridview_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles datagridview.MouseMove
  If CheckMouseMovement(sender, datagridview, e) Then
      listofBuilds = New List(Of Build)
      For Each row As DataGridViewRow In dataGridView.Rows
          If Convert.ToBoolean(row.Cells.Item(0).Value) Then
              Dim t As Build = DirectCast(row.DataBoundItem, Build)
              listofBuilds.Add(t)
          End If
      Next
      If listofBuilds.Count &gt; 0 Then
          dataGridView.EndEdit()
          dataGridView.DoDragDrop(sender, dropEffect)
      End If
  End If
  End Sub
  
   Private Sub TabControl_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles TabControl.DragEnter
       e.Effect = DragDropEffects.All
   End Sub
  
  Private Sub TabControl_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles TabControl.DragDrop
      Dim DropPage As TabPage = GetTabPageByTab(TabControl.PointToClient(New Point(e.X, e.Y)))
      If DropPage IsNot TabControl.SelectedTab Then
          If DropPage Is Page1 Then
          If DropPage Is Page2 Then
          If DropPage Is Page3 Then
            //etc
          End If
      End If
  End Sub
  
  Private Function GetTabPageByTab(ByVal point As Point) As TabPage
      For i As Integer = 0 To TabControl.TabPages.Count - 1
          If TabControl.GetTabRect(i).Contains(point) Then
               Return TabControl.TabPages.Item(i)
          End If
      Next
      Return Nothing
  End Function
  </code></pre>