Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FileToStr with a picture
Message
De
06/01/2009 10:32:52
 
 
À
06/01/2009 07:00:49
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01371275
Message ID:
01371386
Vues:
18
>>>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....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform