Load image from network share

hi,

im just started with xojo and have a question:

how can i load an image into a canvas backdrop from a network share?

Thanks Marco

dim url as String = // your url here dim h as new HTTPSocket dim f as FolderItem = SpecialFolder.Temporary.Child("tmp_pic") if h.Get (url, f, 10) then Canvas1.Backdrop = Picture.Open(f) end if

thanks! but i meant a network share like this:

dim url as String = “smb://user:password@host/Projects/test.jpg”

is that possible?

I don’t know about using with password.

If I use afp (load an image from a shared Mac Folder into Canvas on Linux)

[code] dim f as FolderItem = GetFolderItem ("/run/user/1000/gvfs/afp-volume:host=hostname,user=username,volume=filepath_on_shared_volume")

if f <> nil and f.Exists then
Canvas1.Backdrop = Picture.Open(f)
Else
MsgBox (“error”)
end if[/code]

If you have the possibility to access the (shared) folder you can find out the path with

[code]
dim f as FolderItem = GetOpenFolderItem ("")

if f <> nil and f.Exists then
MsgBox (f.NativePath)
Canvas1.Backdrop = Picture.Open(f)
Else
MsgBox (“error”)
end if[/code]