Mi servirebbe creare un collegamento ad un file (possibilmente scegliendo l'icona).
Ho già trovato alcune guide (anche su questo sito) solo che in tutte quando il codice su vb10 mi da errore:
codice:
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", "")
Mi segna errore Declare e dice Parola chiave non valida come identificatore, di conseguenza anche fCreateShellLink dice 'fCreateShellLink' non dichiarato. Non è accessibile a causa del livello di protezione.
Potete aiutarmi con un codice per vb10??