Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and Animated Gifs
Message
From
23/09/2008 08:39:35
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
VFP and Animated Gifs
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349782
Message ID:
01349782
Views:
84
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  
Reply
Map
View

Click here to load this message in the networking platform