Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a shortCut
Message
From
26/01/2002 23:23:11
 
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00611190
Message ID:
00611199
Views:
21
>How can I create a shortcut from VB 6.0

One simple way is by using the Windows Script Host:
Set shell = CreateObject("WScript.Shell")
DesktopDir = shell.SpecialFolders("Desktop")
Lnk = shell.CreateShortcut(DesktopDir & "\\Shortcut to Notepad.lnk")
Lnk.TargetPath = shell.ExpandEnvironmentStrings("%windir%") & "\notepad.exe"
Lnk.Save()


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform