Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing a .JPG
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01047155
Message ID:
01047176
Vues:
8
Ruben,

...The record in the database will have a field called CASENO and I will rename the .jpg file to match the CASENO (making for a unique match) My question is how to go about calling it from the form.

No Problem. I guess, You have an Image-Object on the form. If so simply issue
lcImagesPath = "..\Images\"  && Directory where the images are located
lcPrefix     = "CASES_"      && in case You do have a prefix for ALL of these images
lcSuffix     = ""            && Maybe You also do have a suffix
lcExtension  = "jpg"         && OK, You will probably have jpg's only

lcThisImage  = addBS(lcImagesPath) + forceExt(lcPrefix + allt(<ALIAS>.CASENO) + lcSuffix, lcExtension)

*-- You might want to have some ErrorChecking
if ! file(lcThisImage)
    = MessageBox(....

else
    thisform.Image1.Picture = lcThisImage

endif
One other question. Within the same form, I have a command button for printing the data on the form. How do I link the .FRX to the .jpg and print the image on the sheet as well ?

Similar. I think You can have a variable as Source for the Picture.
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform