Ok, here's the deal. I'm using a program where a picturebox(a picture of a desktop Inbox/Outbox) will be used to drag a file over to it, and drop it to a specific folder. That's the idea anyway, and I have NO IDEA how to do this. I've got the drag and drop in my file browser working, but I just don't know how to code the drop on the picturebox or even if it's possible to do what I'm trying to do. I like to think that anythings possible! haha but for me right now it's not.
Any ideas, code, or just a general direction to start in would be appreciated.
Drag and Drop from File browser to Picturebox
Page 1 of 13 Replies - 2296 Views - Last Post: 18 May 2012 - 07:37 AM
Replies To: Drag and Drop from File browser to Picturebox
#2
Re: Drag and Drop from File browser to Picturebox
Posted 13 October 2010 - 11:19 AM
Google was helpful.... Dot .Net Curry
#3
Re: Drag and Drop from File browser to Picturebox
Posted 01 November 2010 - 07:45 AM
That would be awesome if I was dragging a picture to a picturebox. However, that is not the case. Let me clear this up a bit. Say there's a file browser on the right and a picturebox on the left. I want to take a file say SomeWordDoc.docx and drag it to the picturebox. When I release the mouse on the picture box, the file will save to a location on the hard drive specified by the picbox.
I've got the drag and drop part down, I just don't know how to get the picbox to save the word doc to a location.
Thanks,
Chris
I've got the drag and drop part down, I just don't know how to get the picbox to save the word doc to a location.
Thanks,
Chris
#4
Re: Drag and Drop from File browser to Picturebox
Posted 18 May 2012 - 07:37 AM
ANCChris, on 01 November 2010 - 07:45 AM, said:
That would be awesome if I was dragging a picture to a picturebox. However, that is not the case. Let me clear this up a bit. Say there's a file browser on the right and a picturebox on the left. I want to take a file say SomeWordDoc.docx and drag it to the picturebox. When I release the mouse on the picture box, the file will save to a location on the hard drive specified by the picbox.
I've got the drag and drop part down, I just don't know how to get the picbox to save the word doc to a location.
Thanks,
Chris
I've got the drag and drop part down, I just don't know how to get the picbox to save the word doc to a location.
Thanks,
Chris
I understand what you're trying to do
Take a look at http://msdn.microsof...y/sfezx97z.aspx and I'm assuming you already made the mouse release event. So look through the coding behind the link I gave you so "how to save files using SaveFiledialogue component".
or
You could save the file to a specific file location, using:
using(StreamWriter output = new StreamWriter("path\to\your\file")) {
provider.Export(document, output);
}
Hope I helped
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|