Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some Images/Pictures not showing in forms
Message
From
20/01/2006 04:27:06
 
 
To
19/01/2006 23:26:02
Sonny Tabano
Trams Printwork, Inc.
Mabalacat, Philippines
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01088766
Message ID:
01088799
Views:
8
I had a similar situation, and the error was that some om my pictures had wrong names. Also be aware that FILE() is not safe since it will sometimes ignore the hardcoded path, and search the VFP path if the file is not in the hardcoded directory. ADIR() on the other hand is 100% safe.
Try to Browse your table
Use yourtable
Browse field x=recno(), empid, picture=ADir(dummy,"C:\MyData\IMAGES\"+ALLTRIM(empid)+".jpg")>1
Where picture shows .F. you have a problem.

>Hi,
>
>just wondering why some of the images/pitures are not showing in the form when i switches/skips between records like for example in an employee data form using VFP9 but works fine with VFP6? What might be the reason?
>
>Thanks a lot
>
>Sample code:
>
>the empid corresponds to the employe number and i use that to match with the .jpeg file
>ex. empid is "0001", then look for "00001"+.jpg = 00001.jpg
>
>
>
>IF FILE("C:\MyData\IMAGES\"+ALLTRIM(empid)+".jpg")
>   ThisForm.imgPic.Picture="C:\MyData\IMAGES\"+iif(wphoto,ALLTRIM(empid)+".jpg","Nophoto.bmp")
>ELSE
>   ThisForm.imgPic.Picture="C:\MyData\IMAGES\Nophoto.bmp"
>ENDIF
>
>
Previous
Reply
Map
View

Click here to load this message in the networking platform