Mensaje
De
21/11/2006 13:49:31
 
 
a
21/11/2006 11:07:12
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Foro:
Visual FoxPro
Category:
Formularios & Diseñador de formularios
Miscellaneous
ID de la conversación:
01171337
ID del mensaje:
01171527
Views:
8
>>>I'm using VFP 6.0. I have a table that stores a key and the location of the picture.
>>
>>You can add this code to the form's refresh
>>if !empty(yourtable.yourfield)
>>  image1.picture=youtable.yourfield
>>  image1.visible=.T.
>>else
>>  image1.visible=.F.
>>endif
>
>I've added a method called (surprised?) "refresh" to the image object itself, and guess what - it gets called on every refresh of the parent. So this code could as well go there, with "image." replaced with "this.".

Personally I usually use a timer to refresh the image, so that if my users navigates in a table, the image is not refreshed during the navigation, but about 0.25s after the navigation is stopped. This prevents flicker and reduces the network traffic. I have created a subclass for this purpose.
Previous
Responder
Mapa
Ver