Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
>Hi,
Im looking for a way to drag and drop pictures from windows explorer to a Picturebox on a form using C#.

Ideally it would resize to the picturebox and be saved along with other textbox details on the form, to a database.

Any suggestions as to where I could start reading up for this. I have no experience with drag drop other than a couple of code snippets i have seen dealing with dragging pictures from control to control on the form.
All help is appreciated.
Posted

Have a look at this[^]
It's a bit old, but it's should still work.

Google - wonderful tool, isn't it?
This was number 1 result for "c# drag drop picturebox"...
 
Share this answer
 
Sadly doesnt help.

and it must be old, Vis studio doesnt recognise half the using statements.
 
Share this answer
 
Comments
Christian Graus 17-Jul-10 19:42pm    
I guess you need to buy a C# book or something. If Visual Studio doesn't recognise a using statement, then you need to import the right dll, I don't know of ANY breaking changes, EVER, between versions of visual studio.
Eddy Vluggen 18-Jul-10 6:19am    
The example-project that Griff mentions is referencing libraries from .NET v1.1 - install that framework and it'll work. (I ran the project on my own PC right now to confirm that)

Alternatively, you can upgrade the project to a more recent framework.
Toli Cuturicu 23-Jul-10 16:54pm    
Reason for my vote of 1
fake answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900