Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FULLPATH Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00112576
Message ID:
00112631
Vues:
28
>Brett,
>
>I'm not sure I'm following 100% here, but I don't think the OLE control gives a rip or understands the VFP path. You'll probably have to make sure you are supplying it a fully qualified path. Make sure you also distribute the .ico file separately, your testing may be finding the one bundled inside the .EXE if it's included in the project.
>
>>I need to have the fullpath of an icon to be used in an OLE list view control. I have my path setup to point to the graphics sub directory, e.g. SET PATH TO 'g:\acmds\graphics;g:\acmds\data;g:\acmds\utils'
>>
>>setpath is on
>>
>>When I run the command FULLPATH('desktop.ico') in the development environment, from the command window I get 'g:\acmds\graphics\desktop.ico', but when I run it from the program I get 'g:\acmds\desktop,ico' and since there is no desktop.ico in the root directory the program will never establish an icon.
>>
>>Am I missing something on fullpath() or is there a bug/feature that I dont understand about it.

I dont include the ico in the project I distribute it under the graphics subdirectory. And that sub directory is in the path, but the following code fails to find the icon:

lcImageKey = trim(lcImage)
lcImageFile = fullpath(lcImageKey)
if file(lcImageFile)
loPicture = LoadPicture(lcImageFile)
if type('loPicture') = 'O' and not isnull(loPicture)
This.oImageList.ListImages.Add(, lcImageKey, loPicture)
This.oSmallImageList.ListImages.Add(, lcImageKey, loPicture)
endif type('loPicture') = 'O' ...
endif file(lcImageFile)

but if I use the following fullpath syntax:

lcImageFile = fullpath('graphics\'+lcImageKey)

It works...
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform