title: Control Not move in drag and drop
body: <p>In my Application i want to move the control one side another side. That control inside the tablelayoutpanel. I would like to drag the control which is inside the panel and the panel is inside the table layout panel so first i remove the control form panel and add the control in form after that i drag the button control its make the issue not clearly dragging. (that means drag fast its not working properly). My Code is</p>
  
  <pre><code>Private Sub HandleDraggableControlMouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button2.MouseDown
      Dim target As Control = TryCast(sender, Control)
      Dim xWidth, xHeight As Integer
  
      If (Not target Is Nothing) Then
  
          xWidth = sender.Width
          xHeight = sender.Height
          sender.Parent.Controls.Remove(sender)
          sender.Dock = DockStyle.None
  
          sender.Width = xWidth
          sender.Height = xHeight
          Me.Controls.Add(sender)
  
          Dim pt As Point = Me.PointToClient(target.PointToScreen(Point.Empty))
          target.Location = pt
          target.Parent = Me
          target.BringToFront()
          Me.isMouseDown = True
          Me.cachedControlPos = pt
          Me.cachedMousePos = Control.MousePosition
  
      End If
  End Sub
  
  Private Sub HandleDraggableControlMouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button2.MouseMove
      If (Me.isMouseDown) Then
          Dim target As Control = TryCast(sender, Control)
          If (Not target Is Nothing) Then
              Dim x As Integer = (Me.cachedControlPos.X + (Control.MousePosition.X - Me.cachedMousePos.X))
              Dim y As Integer = (Me.cachedControlPos.Y + (Control.MousePosition.Y - Me.cachedMousePos.Y))
              target.Location = New Point(x, y)
  
              'c2 = (c1 + (m2 - m1))
  
          End If
      End If
  End Sub
  
  Private Sub HandleDraggableControlMouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Button2.MouseUp
      Me.cachedControlPos = Point.Empty
      Me.cachedMousePos = Point.Empty
      Me.isMouseDown = False
  End Sub
  </code></pre>
  
  <p>My problem is if drag the control fast the control not moved cursor only moved why?. What am doing wrong in my coding?. How is solve the problem?</p>