Results 1 to 6 of 6

Thread: do youy know how!!

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Exclamation

    What is the best way to create shorcuts in any sub folder of the start menu.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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
    Mark
    -------------------

  3. #3

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    yeah but if..

    if i want ,let say,put my shorcut in accessories

    what do i do

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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
    Mark
    -------------------

  5. #5
    New Member
    Join Date
    Oct 2000
    Location
    New Jersey
    Posts
    2
    Does anybody know how to do this in VB6 -- I'm using Vb6stkit.dll but still w/out success. thanks.

  6. #6
    Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    53
    Look at the VBNet site, the example you want is:

    http://www.mvps.org/vbnet/code/shell...rtcutcheat.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width