Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP and Animated Gifs
Message
De
23/09/2008 08:39:35
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
VFP and Animated Gifs
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01349782
Message ID:
01349782
Vues:
85
I got this code from Calvin Hsia's site. It is supposed to NOT work unless the CLEAR RESOURCES line is used. But it works fine for me just the way it is. That's great, but I don't want to get blindsided if there is a problem using animated gifs in my VFP app. Any (relevant) thoughts welcome.

UPDATE: I used an animated gif on my form, but it is jerky and does not display well due to the processing going on while it is visible. Is there a way around this?
#define TESTGIF "d:\monster.gif"
TEXT TO ctemp noshow    && create a string with a few lines of code
      PUBLIC x as Form
      x=CREATEOBJECT("form")
      x.Visible=1
      x.addobject("img","image")    && add an image control and call it "img"
      x.img.picture=TESTGIF
      x.img.visible=1
ENDTEXT
STRTOFILE(ctemp,"temp.prg")   && save as a file on disk
BUILD PROJECT temp FROM temp  && build a project
MODIFY PROJECT temp nowait          && add the GIF to the project so it's embedded inside the target APP, EXE ,or DLL
_vfp.ActiveProject.Files.Add(TESTGIF)
_vfp.ActiveProject.Close
*CLEAR RESOURCES TESTGIF            && this line will fix the problem
BUILD APP temp FROM temp            && build the APP (or exe)
DO temp  
Répondre
Fil
Voir

Click here to load this message in the networking platform