|
-
Oct 5th, 2000, 09:49 AM
#1
Thread Starter
Frenzied Member
What is the best way to create shorcuts in any sub folder of the start menu.
-
Oct 5th, 2000, 10:17 AM
#2
Frenzied Member
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
-
Oct 5th, 2000, 10:20 AM
#3
Thread Starter
Frenzied Member
yeah but if..
if i want ,let say,put my shorcut in accessories
what do i do
-
Oct 5th, 2000, 10:26 AM
#4
Frenzied Member
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
-
Oct 17th, 2000, 05:35 AM
#5
New Member
Does anybody know how to do this in VB6 -- I'm using Vb6stkit.dll but still w/out success. thanks.
-
Oct 17th, 2000, 05:44 AM
#6
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|