>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")
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)