RE:Crear desde VB un acceso directo en el escritor
Publicado por
Miguel (1 intervención) el 12/02/2001 22:21:12
Esto funciona en VB 5.0. Creo que puedes adaptarlo sustituyendo la VB5stkit.dll por la que corresponda en Vb 4.0
Tengo un problema similar en VB 6.0 y todavia no lo he resuelto.
Option Explicit
Private Declare Function fCreateShellLink Lib "VB5stkit.dll" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
Sub Command_Crear_Directo_Click()
Dim Vuelta As Long
'Poner en Escritorio
Vuelta = fCreateShellLink("..\..\Escritorio", "Titulo_Acceso", "Path_ejecutable.exe", "")
'Poner en Inicio-->Programas
Vuelta = fCreateShellLink("", "Titulo_Acceso", "Path_ejecutable.exe", "")
End Sub
Private Sub Command_Fin_Click()
Unload Me
End Sub