Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FileToStr with a picture
Message
From
06/01/2009 10:32:52
 
 
To
06/01/2009 07:00:49
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01371275
Message ID:
01371386
Views:
17
>>>We have code like this:
>>>
>>>m.lcPictureFile = GETPICT()
>>>REPLACE ptPicture WITH FILETOSTR( m.lcPictureFile )
>>>
>>>The problem is that I want to have a default picture. It is FaceProfile.jpg and it is an included file in the project. The FileToStr seems to work above because m.lcPictureFile has the fully qualified path. But, I do not have that with FaceProfile image as it is just part of the project. How can I get this to work?
>>
>>Wouldn't it be more efficient (at least storage-wise) to leave ptPicture empty to indicate a default image and just display the FaceProfile.jpg when that is the case?
>>Regards,
>>Viv
>
>That is exactly what I ended up doing. The issue seemed to be around how Foxpro stores pathing, etc. For what I was doing - and I still don't know exactly why - I had to use the PictureVal property and it had to be either a physical file on disk or a Blob field in a table. I just created a table that I included in the EXE that contained the FaceProfile.jpg file.

Should also make it easy if you decide to use a different jpeg as a default as well....
Previous
Reply
Map
View

Click here to load this message in the networking platform