I am also confused by dagdops but I made it quite finely like this
1st ctrl: ondragbegin { if selected [remember selected, continue] }
2nd ctrl: ondropenter {if remembered something [modify data, modify ctrl1, modify ctrl2]}
also good way is to let dropped data to be "in drag" still ... so you can ping pong data and see them being ponged between controls, and them write only after end mouse down...
um> i am not sure here is my /bit older but only one to this/ example
Private Sub ListView1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseMove
If Not Me.ComboBox1.SelectedIndex = Me.ComboBox2.SelectedIndex Then
If ListView1.SelectedItems.Count > 0 And e.Button = MouseButtons.Left Then
ListView1.DoDragDrop("", DragDropEffects.None)
End If
End If
End Sub
Private Sub ListView2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseMove
If Not Me.ComboBox1.SelectedIndex = Me.ComboBox2.SelectedIndex Then
If ListView2.SelectedItems.Count > 0 And e.Button = MouseButtons.Left Then
ListView2.DoDragDrop("", DragDropEffects.None)
End If
End If
End Sub
Private Sub ListView1_DragLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DragLeave
LeaveDrag(ListView2, ListView1, cb1id())
End Sub
Private Sub ListView2_DragLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView2.DragLeave
LeaveDrag(ListView1, ListView2, cb2id())
End Sub
Enter your message below
Sign in or Join us (it's free).