Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running a Desktop Shortcut from VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00551804
Message ID:
00552022
Vues:
28
>>>How can I Run a Desktop Shortcut from VFP?
>>>
>>>Thanks in advance,
>>>
>>Enmanuel,
>>
>>If you're asking how to create a desktop shortcut, or retrieve the names of the special folders such as the Desktop, Start Menu, etc., there are two resources you should consider.
>>
>>First is the Windows Script Host. The WScript.Shell object exposes a number of methods to deal with this. For more information, look at last October's issue of the VFUG newsletter, which is available on-line at www.vfug.org. This is the second in a series of articles written by Ed Rauh and myself dealing with the WSH.
>>
>>Second, if the WSH isn't an option, my LNKFILES.DLL available in the UT download section can do things like retrieving the desktop folder, creating shortcuts, etc.
>
>Thanks for your reply George. Actually I was looking for a simple way to run a shortcut as if I double-click it. Hilmar sent me the "START" command wich I didn't knew of and it worked. Anyway I'll take a look at the Windows Script Host, you never know when you may need it.
>
>Have a nice day,
>
>
Enmanuel,

Actually, the WSH could be of interest. First, it will retrieve the special folder names for you (so you don't have to hardcode them). Second, the WScript.Shell has a Run method that can be used to launch the shortcut (or any file with an association) directly.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform