Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview and Imagelist using Icons embeded in .app
Message
 
 
To
16/04/2001 19:38:03
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00495438
Message ID:
00495980
Views:
9
>Hi Larry.
>
>>You could embed the pictures and use FileToStr()/StrToFile() to export them out of the app just before you load them into the ImageList and then delete them.
>
>Unfortunately, that won't work directly because, for a reason that escapes me, an image file is stored in an EXE with the full path as it existed on the development machine. So, using something like COPY MYIMAGE.BMP TO TEMPFILE.BMP fails with a "File D:\MyDevelopmentDirectory\MYIMAGE.BMP doesn't exist" because D:\MyDevelopmentDirectory doesn't exist on the user's system.
>
>The solution is to load the images into the memo field of a table included in the EXE and copy them out of there.
>
>Doug

Doug,
For whatever reason, copy File file1 to file2 doesn't work but FiletoStr()/StrtoFile() does. The functions can read from within the EXE and you can then copy where ever you want.

FWIW, I used the EXTERNAL directive to include the files. Ex.

external file starter.bmp
external file wvleft.bmp
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform