What is the best way to create shorcuts in any sub folder of the start menu.
Printable View
What is the best way to create shorcuts in any sub folder of the start menu.
base your solution on this
Code:Option Explicit
'NOTE: In Visual Basic 5.0, change Stkit432.dll in the following
'statement to Vb5stkit.dll.
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
Sub Command1_Click()
Dim lReturn As Long
'Add to Desktop
lReturn = fCreateShellLink("..\..\Desktop", _
"Shortcut to Calculator", "c:\Winnt\system32\calc.exe", "")
'Add to Program Menu Group
lReturn = fCreateShellLink("", "Shortcut to Calculator", _
"c:\Winnt\system32\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", "")
End Sub
this code came from MSDN:
http://support.microsoft.com/support.../Q155/3/03.asp
if i want ,let say,put my shorcut in accessories
what do i do
Code: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
Sub Command1_Click()
Dim lReturn As Long
lReturn = fCreateShellLink("\Accessories", "Mark's Shortcut to Calculator", _
"c:\Winnt\system32\calc.exe", "")
End Sub
Does anybody know how to do this in VB6 -- I'm using Vb6stkit.dll but still w/out success. thanks.
Look at the VBNet site, the example you want is:
http://www.mvps.org/vbnet/code/shell...rtcutcheat.htm