Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to update an image that is changed after showing it?
Message
From
02/12/1996 09:21:17
 
 
To
28/11/1996 13:50:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00013719
Message ID:
00013915
Views:
43
>Nothing described above will work. It seems that whenever you display an image, Foxpro will load the image into the memory. If you display an image next time, Foxpro will look up the file name to see if it has been loaded. If it finds it (only the filename), Foxpro only use the image data in the memory!!!
>
>Try this:
>
>MyForm.MyImage.Picture="c:\myoldpic.bmp" && myoldpic.bmp will be shown
>MyForm.MyImage.Picture="" && nothing will be shown
>******* Edit myoldpic.bmp now, and make some change on
>******* the bitmap and save it
>MyForm.MyImage.Picture="c:\myoldpic.bmp" && we expect the changed
> && bitmap will be shown!
> && NO, ONLY THE OLD ONE!
>
>then try this:
>MyForm.MyImage.Picture="c:\myoldpic.bmp" && myoldpic.bmp will be shown
>****** delete the file c:\myoldpic.bmp
>MyForm.MyImage.Picture="c:\myoldpic.bmp" && nothing will be shown
>******* copy another bitmap file to myoldpic.bmp
>MyForm.MyImage.Picture="c:\myoldpic.bmp" && we expect the new
> && bitmap will be shown!
> && NO, ONLY THE OLD ONE!

Yes I had this problem with Image control and used the following way to go around: 1. Generate unique temp file name with SYS(3)
2. Use this file name (you can copy bmp into it) as Picture property.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform