Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH - shortcuts, setting properties programatically
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
WSH - shortcuts, setting properties programatically
Divers
Thread ID:
00742107
Message ID:
00742107
Vues:
93
The code below will create a shortcut:
WshShell = Createobject("Wscript.shell")
strDesktop = Alltrim(WshShell.SpecialFolders(tcShortCutPlacement))
oMyShortcut = WshShell.CreateShortcut(strDesktop+"\"+tcShortCutName)
oMyShortcut.WindowStyle = 4  && 1=normal 3=Maximized 7=Minimized  4=Normal
oMyShortcut.IconLocation = lcSaveIconDir
oMyShortcut.TargetPath = lcSaveTargetPath
oMyShortcut.WorkingDirectory = lcSaveWorkingDir
oMyShortcut.HotKey = "ALT+CTRL+F"
oMyShortcut.Description = lcSaveDescription
*oMyShortcut.Arguments = "C:\myFile.txt"
I know the name of the shortcut determines the title you see under the icon on the screen and you can rename the 'lnk' file to change that title.

1. Is there a way to name the file while creating the shortcut (different from the target name)?
2. How to change other properties like 'close on exit' while creating the shortcut or programatically?
Dr. Ken A. McGinnis
Healthcare software design
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform