Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a Desktop Shortcut from VFP
Message
De
03/09/2001 11:55:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00551804
Message ID:
00551820
Vues:
23
>>This example works on my machine:
>>
>>
>>run start c:\windows\escritorio\pcp.lnk
>>
>>
>>For a more elegant solution, you should probably check the download section, or FAQ, on how to open a document with its default application.
>>
>>I don't know how to get the desktop folder, which I hardcoded above.
>>
>>Hilmar.
>
>Thanks a lot Hilmar. That's exactly what I needed.
>
>Enmanuel

I am glad to be of help. However, please note some limitations:

1) Windows may be installed in a different folder that c:\windows. For instance, on Windows NT, the default installation is in c:\winnt. However, the person who installs the OS may decide to use another folder.

2) If the OS is in English, the desktop folder will be called "desktop", not "escritorio".

There is probably some API function that will tell you the exact name of the desktop folder. But API is confusing for me - I only use API functions as I get them from the UT, or with minor modifications. For now, I don't do major investigations into the API documentation myself.

Hilmar.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform