Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Shortcuts Programmatically
Message
From
25/09/2000 13:06:54
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00420494
Message ID:
00420529
Views:
15
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform