Copy a picture to the Clipboard

What are the “best practices” for copying a picture (and its folderItem) to the clipboard?

I’m thinking something like this, but I don’t know what’s the “proper” way to do it:

        dim c as new Clipboard
        c.text = f.URLPath
        c.addRawData f.URLPath, "public.url"
        c.Picture = f.OpenAsPicture
        c.close

I’m guessing this is not the way to do it for Windows, though.

Any ideas?

Honestly, I don’t know. It’s a good question that I’ve not had to answer in 12+ years of Real Studio/Xojo development.

I would test it in Windows and if it works then you’re good. If it doesn’t then perhaps conditional compiling with #if #then #else is required. Kind of curious on what the results are.

Looks good to me, but as for Windows, I don’t even know if there is a standard for files on the clipboard. But c.picture will do it.