Hi All!
I am implementing drag and drop for a PictureBox control in my
application. Basically, on the mousedown event for my control I do
something along these lines (what follows is just the essential stuff,
oh and I'm using c#):
DragDropEffects myEffect =
myPictureBox.DoDragDrop((Bitmap)myPictureBox.Image,
DragDropEffects.Copy);
and on the DragDrop event for myPictureBox control, I do:
if(e.Data.GetDataPresent(DataFormats.Bitmap)){
myPictureBox.Image = (Bitmap)e.Data.GetData(DataFormats.Bitmap);
}
Okay, so dragging and dropping images from different applications (or
from within my application) works great. It sets the Image field of
the myPictureBox control to the image I just dragged and dropped...
however, trying to drag *from* myPictureBox onto another application
doesn't work. Now, I figure this has to do with the Effects I'm
allowing for my DoDragDrop call on the mousedown event, but I'm not
really sure. Dragging and dropping between two picturebox controls
inside my application works fine, however.
Any ideas?
Thanks for the help, and I'm sorry if I'm posting in the wrong place.
Mustafa
John Hornick [MSFT] - 26 Dec 2003 19:32 GMT
Hi,
This is not a System.Drawing question. Try posting on the
WindowsForms newsgroup.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
> I am implementing drag and drop for a PictureBox control in my
> application. Basically, on the mousedown event for my control I do
[quoted text clipped - 23 lines]
>
> Thanks for the help, and I'm sorry if I'm posting in the wrong place.