Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type of images
Message
De
03/10/2006 02:52:41
 
 
À
02/10/2006 14:09:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01158496
Message ID:
01158774
Vues:
22
hi,
thank you for reply,
i try as under , but i got error message Variable "lcFileName" is not found
**at  command button via click event
IF !EOF()
   thisform.text1.value=thisform.text1.value+1
   thisform.text2.value=nam 
   local lcImageFile
 lcImageFile = "images\"+alltrim(str(thisform.text1.value)) +(".jpg")+(".GIF")
if file(lcImageFile)
   ThisForm.Image1.Picture = lcImageFile
  SKIP
else
   MessageBox("The picture doesn't exist - filename: " + lcFileName)
  skip -1 
endif
ENDIF 
>>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
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform