crear un acceso directo a una url

29/12/2003 - 20:42 por Jesus Ramon Lopez Dominguez | Informe spam
Grupo como creo un acceso directo a una url
programo en visual basic, o en que?

gracias?

JeSuSx

Preguntas similare

Leer las respuestas

#6 Morgan
30/12/2003 - 09:16 | Informe spam
De la api-guide..

Option Explicit
'Source: MSDN column 'Ask Dr. GUI'
Private Declare Function fCreateShellLink Lib "vb6stkit.dll" (ByVal
lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal
lpstrLinkPath As String, ByVal lpstrLinkArguments As String, ByVal fPrivate
As Long, ByVal sParent As String) As Long

Private Sub Form_Load()
Dim strGroupName As String, strLinkName As String
Dim strLinkPath As String, strLinkArguments As String
Dim fPrivate As Boolean, sParent As String
Dim fSuccess As Boolean

strLinkName = "Shortcut to Calculator"
strLinkPath = "c:\Windows\calc.exe"
strLinkArguments = ""
fPrivate = True ' Add shortcut to desktop.
strGroupName = "..\..\Escritorio"
sParent = "$(Programs)"
fSuccess = fCreateShellLink(strGroupName & vbNullChar, strLinkName,
strLinkPath, strLinkArguments & vbNullChar, fPrivate, sParent)
'the path should never be enclosed in double quotes
If fSuccess Then
MsgBox "Created desktop shortcut"
Else
MsgBox "Unable to create desktop shortcut"
End If

' Add shortcut to Programs menu.
strGroupName = "$(Programs)"
sParent = "$(Programs)"
fSuccess = fCreateShellLink(strGroupName & vbNullChar, strLinkName,
strLinkPath, strLinkArguments & vbNullChar, fPrivate, sParent)
'the path should never be enclosed in double quotes
If fSuccess Then
MsgBox "Created shortcut on Programs menu"
Else
MsgBox "Unable to create shortcut on Programs menu"
End If

' Add shortcut to Startup folder of Programs menu.
strGroupName = "Inicio"
sParent = "$(Programs)"
fSuccess = fCreateShellLink(strGroupName & vbNullChar, strLinkName,
strLinkPath, strLinkArguments & vbNullChar, fPrivate, sParent)
'the path should never be enclosed in double quotes
If fSuccess Then
MsgBox "Created shortcut in Startup folder"
Else
MsgBox "Unable to create shortcut in Startup folder"
End If
End Sub

Saludos Morgan

Jesus Ramon Lopez Dominguez wrote:
ok muchas gracias
pero para dejarlo automaticamente en el desktop de donde tomo la ruta?

gracias
JeSuSx
"Eduardo A. Morcillo [MS MVP VB]" <emorcilloATmvps.org> escribió en el
mensaje news:
Grupo como creo un acceso directo a una url
programo en visual basic, o en que?



Los accesos directos para URL (o sea los archivos .url) son archivos
de texto con el formato de archivos .ini. Para crear uno puede usar
la API de archivos .ini o directamente crear el archivo usando Open y
Print:

Open "mi pagina.url" For Output As #1
Print #1, "[InternetShortcut]"
Print #1, "URL=http://www.mvps.org/emorcillo"
Close #1
Respuesta Responder a este mensaje
#7 Chelo
30/12/2003 - 14:48 | Informe spam
Hola

El siguiente link te puede servir, es un codigo en VB

http://www.freevbcode.com/ShowCode.Asp?IDE6

Espero que sea de tu ayuda

Grupo como creo un acceso directo a una url
programo en visual basic, o en que?

gracias?

JeSuSx


.

email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una pregunta AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida