Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drag&drop between objects
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00867409
Message ID:
00867473
Views:
19
Thanks Eric, but, I forgot to mention in my previous post, I set this property.
Actually in the new() event just after the InitializeComponent() call.
Even adding allowdrop=true in the load() doesn't work, have you other suggestions?
Keep in mind that the DragEnter, DragLeave, ecc. works!!

Franco

>You need to set the AllowDrop property of the PictureBox to True. But this property doesn't show into the properties dialog. The simplest workaround is to set them into the Load event:
>
PictureBox1.AllowDrop = True
>
>My February column in the UTMag (www.utmag.com) is on this topic!
>
>
>>Hi all,
>>I'm trying to implement a simple Drag&Drop operation between two PictureBox on the same form (VB.NET), but it seems that the DragDrop event on the Destination object doesn't fire.
>>If I put a messagebox in the DragEnter, DragLeave, ecc. I can see that those events fire, but the DragDrop no!
>>Here's some of the code
>>
>>Private Sub PictureBoxSource_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBoxSource.MouseMove
>>   If e.Button = MouseButtons.Left Then
>>      Dim dropEffect As DragDropEffects = sender.DoDragDrop(sender, DragDropEffects.Copy)
>>      MessageBox.Show("End drag! " + dropEffect.ToString)
>>   End If
>>End Sub
>>
>>Private Sub PictureBoxDest_DragOver(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles PictureBoxDest.DragOver
>>   e.Effect = DragDropEffects.Copy
>>End Sub
>>
>>Private Sub PictureBoxDest_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles PictureBoxDest.DragDrop
>>   MessageBox.Show("DragDrop ")
>>End Sub
>>
>>
>>Perhaps I am not understanding how to do Drag&Drop operations, any suggestions?
>>
>>Thanks, Franco
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform