>Ciao a tutti,
Ciao!
>come si crea tramite codice il collegamento .lnk di un programma?
Ecco uno snippet che uso la libreria STKIT432.Dll :
Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal _
lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal _
lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
'
'code to create the shortcut
'
Dim lReturn As Long
'Add to Desktop
lReturn = fCreateShellLink("..\..\Desktop", _
"Shortcut to Calculator", "c:\Windows\calc.exe", "")
'Add to Program Menu Group
lReturn = fCreateShellLink("", "Shortcut to Calculator", _
"c:\Windows\calc.exe", "")
'Add to Startup Group
'Note that on Windows NT, the shortcut will not actually appear
'in the Startup group until your next reboot.
'lReturn = fCreateShellLink("\Startup", "Shortcut to Calculator", _
'"c:\Winnt\system32\calc.exe", "")
Oppure prova a dare un'occhiata qui, è piu semplice :
http://www.geekpedia.com/tutorial125_Create-shortcuts-with-a-.NET-application.html
;)
------------------------------------------
Ignazio Catanzaro
http://blogs.dotnethell.it/swdev/