G
Guest
I am pretty sure that I am just missing some little piece of knowledge...
I have a test application. It has a text box and a picture box in a panel
(so I can get drag/drop for the picture box.)
The issue I have is that I can NOT drag a picture box object into another
application (either a second image of the test program or MS Word.) Here is
what I have:
1. I can drag the text of text box to another text box in the application
2. I can drag the text of text box to msWord (or any other app)
3. I can drag the bitmap in the picture box to another picture box in the
application
4. I can NOT drag the bitmap in the picture box to msWord (or any other app)
4a. I can put the bitmap on the clipboard and then paste it into msWord.
5. msWord can drag text and bitmaps to my test application.
So it smells like my code for starting the drag drop operation is not
complete when I am going to drag between applications. It's C#, and here is
the line of code from the pictureBox_MouseDown:
this.pictureBox1.DoDragDrop(this.pictureBox1.Image,DragDropEffects.Copy);
The clipboard copy is:
Clipboard.SetDataObject(this.pictureBox1.Image,false);
I thought I might need to create and DoDragDrop on a DataObject object; but
that was a dead end. Yes, I could write a file like IE does; but that seems
like unnecessary disk i/o.
Any ideas are appreciated...Chuck
I have a test application. It has a text box and a picture box in a panel
(so I can get drag/drop for the picture box.)
The issue I have is that I can NOT drag a picture box object into another
application (either a second image of the test program or MS Word.) Here is
what I have:
1. I can drag the text of text box to another text box in the application
2. I can drag the text of text box to msWord (or any other app)
3. I can drag the bitmap in the picture box to another picture box in the
application
4. I can NOT drag the bitmap in the picture box to msWord (or any other app)
4a. I can put the bitmap on the clipboard and then paste it into msWord.
5. msWord can drag text and bitmaps to my test application.
So it smells like my code for starting the drag drop operation is not
complete when I am going to drag between applications. It's C#, and here is
the line of code from the pictureBox_MouseDown:
this.pictureBox1.DoDragDrop(this.pictureBox1.Image,DragDropEffects.Copy);
The clipboard copy is:
Clipboard.SetDataObject(this.pictureBox1.Image,false);
I thought I might need to create and DoDragDrop on a DataObject object; but
that was a dead end. Yes, I could write a file like IE does; but that seems
like unnecessary disk i/o.
Any ideas are appreciated...Chuck