3 Replies - 3209 Views - Last Post: 18 May 2012 - 07:37 AM Rate Topic: -----

#1 ANCChris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

Drag and Drop from File browser to Picturebox

Posted 12 October 2010 - 06:57 AM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Drag and Drop from File browser to Picturebox

#2 demausdauth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 638
  • Joined: 03-February 10

Re: Drag and Drop from File browser to Picturebox

Posted 13 October 2010 - 11:19 AM

Google was helpful.... Dot .Net Curry
Was This Post Helpful? 0
  • +
  • -

#3 ANCChris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

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
Was This Post Helpful? 0
  • +
  • -

#4 aquahoya  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 59
  • Joined: 08-January 12

Re: Drag and Drop from File browser to Picturebox

Posted 18 May 2012 - 07:37 AM

View PostANCChris, 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 understand what you're trying to do :shuriken: I'm planning on doing something like this but a tad differently.
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 :batman:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1