I’m doing maintenance on an older project that is still with AbsolutePath when I step nativePath the image is not found, below is what I did:
when I drag a file it is placed in a listbox with this code:
if obj.FolderItemAvailable then
loop until not obj.NextItem[/code]
loads the file normally in the listbox, then I give double click in the cell, the image is loaded into a canvas with this code:
[code] Dim i, last as Integer
Dim f as FolderItem
Dim p, pic as Picture
Dim factor As Double
Dim imagepath as string
Dim maxWidth, maxHeight As Integer
maxWidth = Canvas1.Width
maxHeight = Canvas1.Height
imagepath=Window1.listbox1.cell(Window1.Listbox1.listindex,2) '<< path.
If f <> Nil then
If f.exists then
factor = Min( maxWidth / p.Width, maxHeight / p.Height )
factor = Min( factor, 1 ) // (don’t scale it up if it’s too small!)
factor= factor * 1
pic = NewPicture( p.Width * factor, p.Height * factor, 32 )
pic.graphics.DrawPicture p, 0,0,pic.width,pic.height, 0,0,p.width,p.height
when I put in NativePath the image is not found, already in AbsolutePath everything goes as expected, could someone tell me what I’m doing wrong?
I appreciate any help, thank you!