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

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
 
S

Steve C. Orr [MVP, MCSD]

You are correct.
Instead, move your MessageBox code to the Button_MouseUp Event or the
DragLeave event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top