Drag & Drop can't work with Click?????

  • Thread starter Thread starter Mike Chan
  • Start date Start date
M

Mike Chan

_< If I use the "Drag & Drop" function in the application, then the "Click"
function no more work!!!!

For example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
MessageBox.Show("C")
End Sub

Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
Button1.DoDragDrop(Button1.Text, DragDropEffects.Copy)
End Sub
 
You are correct.
Instead, move your MessageBox code to the Button_MouseUp Event or the
DragLeave event.
 
Back
Top