By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

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

P: n/a
>_< 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
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You are correct.
Instead, move your MessageBox code to the Button_MouseUp Event or the
DragLeave event.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Mike Chan" <ia*@mikechan.net> wrote in message
news:OS**************@TK2MSFTNGP10.phx.gbl...
_< 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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.