Results 1 to 3 of 3

Thread: how can i use osfcreateshelllink??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    mousafah,abu-dhabi,UAE
    Posts
    29
    hi all,

    how can i use the API OSfcreateShellLink to create a short cut in :

    desktop

    start menu

    waiting for F.B

    thanx on advance

    Ahmed Walid

  2. #2
    Guest
    Code:
    'In Visual Basic 5.0, change Stkit432.dll in the following
    'statement to Vb5stkit.dll.  Stkit432.dll is for Visual Basic 4.0
    'For VB6, change it to VB6STKIT.DLL
    
    
    Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal
    lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As
    String, ByVal lpstrLinkArgs As String) As Long
    
    
    '
    
    
        Dim lReturn As Long
    
        'Add to Desktop
        'lReturn = fCreateShellLink("..\..\Desktop", _
        '"Shortcut to Calculator", "c:\windows\calc.exe", "")
    
        'Add to Program Menu Group
        'lReturn = fCreateShellLink("", "Shortcut to 
        'Calculator", "c:\windows\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:\windows\calc.exe", "")

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    mousafah,abu-dhabi,UAE
    Posts
    29
    hi again,

    i tried the above code but i discovered that FcreateShellLink version for VB6 is OSfCreateShellLink
    and its decleration is

    Code:
    Declare Function OSfCreateShellLink Lib "vb6stkit.dll" _
    Alias "fCreateShellLink" (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
    as noted above there's 2 extra arguments:
    sParent
    fPrivate

    waiting for F.B

    bYe
    Ahmed Walid

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