DragPicture.xojo_binary_project example

The DragPicture.xojo_binary_project example “does not works”:

a. You can drag the Studebaker car photo to the Finder, but no file is created,
(Of course, there is no code to allow that…)

b. The front window have a Label who states:
“Drag the image from the canvas, or drag a new one into it”
But this does not works too.
(The code in ImageCanvas.Open allows only a PictureDrop)

c. Drag the image onto a Firefow (empty) Tab
Does not works too.
(The code probably allow drags to another application: PictureDrag. Since the code is really complex, I will not give more comments.)

I tested the example with Xojo 4.1 (and old to older projects with Xojo 2015r1).

Question: Did I have too many expectations from this example project or… this example project is a bit useless ?

Before my click in the Start Conversation button, I build the application, drop an image from Firefox onto the image, then run the project in the IDE and drag and drop the new image to the other application: PictureDrop works fine in both directions.

Tried it. does nothing.

Maybe it has to do with PICT being deprecated.
I do find it odd that there is no way to state the format of the image being copied in this way.
Probably why you are creating a folder item in temp first.

You can drag the image to another app (I just tried Apple Notes). And you can also drag an image from an app (I dragged a pic in a browser tab) to replace what is displayed in the canvas. Going to/from Finder likely requires dealing with files rather than pictures.

In Linux it does not work either. Drag ends on the window borders.

Hi Paul,

The first time that I ran the DragPicture Example program, the picture successfully moved from the Xojo program to Microsoft Word (Windows 10, Xojo 2016 r4.1). After closing MS Word and trying it again, the picture did not copy to Microsoft Word.

I then copied the Hubble.jpg picture in the Graphics and Multimedia->ObjectsInCanvas->Graphics folder to Microsoft Word and then tried to drag and drop it into the Xojo program and it did not work, meaning there was no change in the picture and the original car picture remained.

Is there something that I am missing when running this example program? Thanks.

Off-hand, I’m not sure. When I’m back in the office I can look at the events more to see what is happening. Perhaps other drag types are needed in order to get pictures in more situations?