Link file con VB6

TomSawyer1
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"

Risposte
antonio89x
Grande Crook! Finalmente!

TomSawyer1
E' un piacere :D

Rispondi
Per rispondere a questa discussione devi prima effettuare il login.