Hi David,
Thats odd on my XP (VFP9) i am seeing the issue with your code.
_screen.AddObject( "oimg", "image" )
_screen.oimg.Visible = .t.
_screen.oimg.picture = 'C:\DOCUMENTS AND SETTINGS\DAVID\MY DOCUMENTS\MY PICTURES\FPNORMAL.PNG'
**delete now gvies file in use by another user
_screen.oimg.picture = ''
**can now delete
Would there be some settings for this?
Maybe it makes a diff. if the png is transparent or not as most of mine are.
Cant seem to get picval to work not sure why.
cPict = FILETOSTR('C:\IMAGES\BMP\Jk02b.BMP')
_screen.oimg.PictureVal = cPict
**this works (because its a BMP???)
cPict = FILETOSTR('C:\IMAGES\PNG\ia3002_1.png')
_screen.oimg.PictureVal = cPict
**doesnt work (because its a PNG?)
BR
Tim
>Tim,
>
>I'm not seeing the issue in XP here:
>
>
>_screen.AddObject( "oimg", "image" )
>_screen.oimg.Visible = .t.
>_screen.oimg.picture = 'C:\DOCUMENTS AND SETTINGS\DAVID\MY DOCUMENTS\MY PICTURES\FPNORMAL.PNG'
>
>
>It displays the image and I can delete the file.
>
>What about setting the binary content of the image using .PictureVal rather than the .Picture?
>
>>If I am using the image control in VFP9.
>>- If the JPG is open in the control it can be deleted from the disk
>>- If the PNG is open in the control it cannot be deleted from the disk.
>>
>>I also noticed if a PNG is open in the XP image viewer (dbl click it)
>>then it can be deleted while being viewed.
>>
>>Can anyone tell me why PNG files are locked when they are open for viewing?
>>Is there anything i can do about this?