הקוסם המעופף
New member
קוד ליצירת קיצור דרך
Private Sub Command1_Click() 'ctrl+d is a shortcut key. Call CreateShortcut("c:/your shortcut.lnk", "C:\your file.exe", "CTRL+D", "Shortcut To my program.exe") End Sub 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
Private Sub Command1_Click() 'ctrl+d is a shortcut key. Call CreateShortcut("c:/your shortcut.lnk", "C:\your file.exe", "CTRL+D", "Shortcut To my program.exe") End Sub 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