Link file con VB6
Tempo fa, si chiedeva come si potessero creare i link file con VB6. Se qualcuno è ancora interessato...
Public Function CreateShortcut(ShortName As String, PointsTo As String, Optional HotKey As String = "", Optional Description As String = "")
Dim WS As Object, SC As Object
Set WS = CreateObject("Wscript.Shell")
Set SC = WS.CreateShortcut(ShortName)
SC.TargetPath = PointsTo
SC.HotKey = HotKey
SC.Description = Description
SC.Save
End Function
Esempio:
CreateShortcut "C:\CMD.lnk", "C:\Windows\System32\CMD.exe", "CTRL+D", "Shortcut To CMD.exe"
Public Function CreateShortcut(ShortName As String, PointsTo As String, Optional HotKey As String = "", Optional Description As String = "")
Dim WS As Object, SC As Object
Set WS = CreateObject("Wscript.Shell")
Set SC = WS.CreateShortcut(ShortName)
SC.TargetPath = PointsTo
SC.HotKey = HotKey
SC.Description = Description
SC.Save
End Function
Esempio:
CreateShortcut "C:\CMD.lnk", "C:\Windows\System32\CMD.exe", "CTRL+D", "Shortcut To CMD.exe"
Risposte
Grande Crook! Finalmente!
E' un piacere
