Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Shortcuts Programmatically
Message
De
25/09/2000 13:06:54
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00420494
Message ID:
00420529
Vues:
14
>Is there an API call that allows for the creation of a shortcut?

I found a VB example of using the Windows Script Host and modified it for VFP.
** MakeSC()
LPARAMETERS tcLink, tcTargetPath, tcDescription, tcWorkingDirectory
LOCAL loShell, loShortcut, lcDesktop
loShell = CREATEOBJECT("WScript.Shell")
lcDesktop = loShell.SpecialFolders("Desktop")
loShortcut = loShell.CreateShortcut(lcDesktop + "\\" + tcLink + ".lnk")
loShortcut.TargetPath = tcTargetPath
loShortcut.WindowStyle = 1
loShortcut.Description = tcDescription
loShortcut.WorkingDirectory = tcWorkingDirectory
loShortcut.Save()
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform