Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieve images from EXE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01250756
Message ID:
01250793
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform