Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Type of images
Message
From
02/10/2006 14:09:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/10/2006 07:27:37
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158496
Message ID:
01158636
Views:
19
>Hi,
>
>thank you for reply, i don't know what you mean?

Tore means that you should use the debugger (or any other debugging technique, like showing information with a WAIT command or with a MessageBox()), to see what is the name of the file you are trying to fetch. Then, you can see if the file exists, or if it even has a correct name.

You should change your code, to make debugging easier. Specifically, you should separate the filename to a variable, like this:
local lcImageFile
lcImageFile = "images\"+alltrim(str(thisform.text1.value))+(".GIF") +(".jpg")&& or and +(".jpg")
MessageBox("The filename is: " + lcImageFile)
Thisform.Image1.Picture = lcImageFile
If you separate the filename into a variable, as in my code above, it is easier to debug (debug means to find errors).

The MessageBox() command was inserted to show if the file name is correct. Once it works, you can take MessageBox() out; instead, you can add other commands, for example, to test whether the file, specified by the user, exists:
if file(lcImageFile)
  ThisForm.Image1.Picture = lcImageFile
else
  MessageBox("The picture doesn't exist - filename: " + lcFileName)
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform