Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CLEAR RESOURCES filename - NOT!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00036939
Message ID:
00037034
Vues:
39
>>>I have an ocx control that creates a map on a form. I can export the map to a bitmap file. I then use the bmp in a report. The bmp is placed on the report as a picture.
>>>
>>>Naturally, the map changes depending on the data. When the user clicks the Print button on the form, I export the new map, replacing the old bitmap with the new and then run the report. Unfortunately, the bitmap that prints in the report never changed.
>>>
>>>Using VFP's excellent help system (insert derisive comments here), I did manage to find the CLEAR RESOURCES statement. Supposedly, if I issue "CLEAR RESOURCES mymap.bmp", it clears the cached image and allows it to reload. However, this does not work.
>>>
>>>What can I do?
>>>
>>>TIA
>>
>>Gary,
>>
>>I assume that you're using a file reference as the source of the picture on the report rather than a general field with the reference to the file. I got exactly the same results using the file reference, but everything updated OK from the field.
>>
>>If so, add a general field to the table and store the reference using APPEND GENERAL. I don't know if this might cause some other problems, but it's a start.
>>
>>HTH
>>
>>George
>
>I got this problem too and I agree with George: it never fails from Gen field. Another option might be generating bmp files with unique names and changing FRX Name field (for ObjCode=17) on fly.

Thanx guys! I was afraid I'd have to go the general field route but one can hope!
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform