Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Refresh

Status
Not open for further replies.

RichardH

Programmer
Apr 21, 2001
46
US
When I include an image on a form and assign the picture property as “mypicture.jpg” the image displays, then I copy a different image into the same file name “mypicture.jpg”. The new image will not display until I exit and restart VFP6. Is there any way I can display the new image without having to restart.
 
RichardH

You cannot refresh an Image control, but if you restate the picture property after you have copied a new image to "mypicture.jpg", that will effectively refresh the control.

See the last post in thread184-132056

Chris :)
 
VFP will sometimes have the image in memory and when the name is the same, it will not show the newer image.

The trick is just to blank your image control and assign it again to the image control (which could be done in the Refresh() method).

HTH,
Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
weedz

I can't agree with you on this.

(which could be done in the Refresh() method).

I assume you mean THISFORM.refresh()?

If so, that could mean a lot of unnecessary processor activity, nor is there any need to 'blank' the picture property.

THISFORM.Image1.Picture = [mypicture.jpg]

after copying the new image, is sufficient in its own right.

Chris :)
 
Chris, you are right.

I made a control like that myself, but I forgot that I put it in a container, which does have a refresh method.

But, we have had some trouble with image refreshing in the past, and Fox did keep it in memory, this was very strange behaviour.

Greedz,

Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top