Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How determine strartup folder inside app started from VF
Message
De
30/09/1998 07:49:06
 
 
À
30/09/1998 07:38:38
Dmitry V.Glouzdov
LUKOIL (Nizhny Novgorod)
Nizhny Novgorod, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00142271
Message ID:
00142298
Vues:
33
>Hi!
>Thank you for reply.
>>Hi, neighbor
>>If I understand correctly, you want to get the folder your app is in. That's simple, you use CURDIR(), or even better something like following:
>>
 lcCurrentDirectory = SYS(5); &&  current drive
>> + CURDIR()  && current directory
>
>This will work only if you will start MyFile.App from System Menu Program/Do
>or type in Command Window two commands:
> SET DEFAULT TO (sMyAppLocation)
> DO MyFile.App
>
>But how determine folder (sMyAppLocation) inside my app if I will type next:
> SET DEFAULT TO HOME()
> DO (sMyAppLocation+"MyFile.App")
>???????????

Well, interpreting our examples, I'd try something like following:
LOCAL lcAppPath
lcAppPath = FULLPATH(CURDIR()) + "MyApp.app"
CD HOME()  && The same as SET DEFAULT TO HOME()
DO (lcAppPath)
--  OR
LOCAL lcAppPath
lcAppPath = FULLPATH(CURDIR())    && Only the path
CD HOME()
DO (lcAppPath + "MyApp.app")
See you later, aligator
Danijel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform