The example project you picked is not for images but for dragging text between the two boxes.
If you want to drop images, create a project with a canvas, and in the Open event, add what Tim Hare told you :
Me.AcceptFileDrop("special/any;")
In the DropObject event :
Me.Backdrop = Picture.Open(Obj.FolderItem)
Be careful, there is no filter that prevents you from dropping non-image files over. You want to add something like :
If right(Obj.FolderItem.Name,4) = ".png" or right(Obj.FolderItem.Name,5) = ".jpeg" then
Me.Backdrop = Picture.Open(Obj.FolderItem)
end if
With all the image extensions you intend to use, so non-pictures will not create an error.
You may want to rest your canvas on top of a Group Box to see where it is. Canvas are invisible at run time when they do not contain images.
[quote=81876:@Daljit Summan]This was the very first todo item on a project I am starting and it failed, I spent 2 hours searching the web and trying all the examples but to no avail.
Has anyone got any suggestions, so far this hasn’t been a great experience.[/quote]
It is actually a very good first lesson in programming. You survived it and found your way here. Welcome
- Never take coding for granted. It baffles even the most seasoned developers.
- When you feel like stuck, have a beer or a cup of tea, go for a walk, phone a friend, watch TV, and when you come back, chances are it will be easier
- Don’t search the web when you have this forum
Contrary to application software, programming requires accepting ignorance as a chance to learn rather than as an unjust experience.