Alright my goal is to test to see if the user has dragged a label over a button. I have add event handlers for MouseMove and ButtonEnter, the trick is that i dont want the buttonEnter sub to fire unless the user is actually dragging a label.

vb Code:
  1. Dim dragging As Boolean = False
  2.  
  3.    Public Sub Label_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
  4.         Static lOffset As Point
  5.         lbl = DirectCast(sender, Label)
  6.         If e.Button = MouseButtons.None Then
  7.             lOffset = New Point(e.Location)
  8.             dragging = False
  9.         ElseIf e.Button = MouseButtons.Left Then
  10.             lbl.Location = lbl.Location + e.Location - lOffset
  11.             dragging = True
  12.         End If
  13.     End Sub
  14.  
  15.     Private Sub Button_MouseEnter(sender As System.Object, e As System.EventArgs)
  16.         If dragging = True Then
  17.             MsgBox("This is a Test")
  18.         End If
  19.     End Sub

I thought would work but because the user is dragging the label the mouse never actually enters the button field.

I also tried doing lbl.location = button.location... but unless the label and the buttons are the exactly the same size in exactly the same location then the event wont trigger.

Is there an easy solution to this?