Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve images from EXE
Message
 
To
27/08/2007 17:05:15
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01250756
Message ID:
01250793
Views:
27
Hi Cesar,

If the libraries and the images are compiled into the same EXE, you can use FILETOSTR to load the image into a string. Then you can pass this string to an API function that loads the image from memory. In any case, right now, I'm using the following code to load embedded images. Copying the file into the temporary directory isn't that much of a performance hit:
  If ADir(laFile,Addbs(GetEnv("TEMP"))+JustFname(m.lcImage)) == 0
  	StrToFile(FileToStr(m.lcImage),Addbs(GetEnv("TEMP"))+JustFname(m.lcImage))
  EndIf 
  loImage = _Screen.System.Drawing.Image.FromFile( ;
    Addbs(GetEnv("TEMP")) + JustFname(m.lcImage) ;
  )
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform