Results 1 to 5 of 5

Thread: .lnk files

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    right, if anyone can tell me how to do this, i'll be amazed, because i can't find anything about it anywhere...

    how do i create a shortcut file from my program

    it's got to be fairly simple, surely..?!?!?!

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
    'Usage:
    fCreateShellLink "C:\windows\Desktop", "Link to my program", "C:\Path\Program.exe", ""
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    New Member
    Join Date
    Aug 2000
    Location
    Rancho Cordova, CA
    Posts
    1

    This doesn't seem to work in VB5.

    I've tried to use an absolute path as the first parameter to fCreateShellLink, but it just doesn't work. The only type of parameter that does work is one that is relative to the Startup directory. Do I need VB6 to make this work?


    Originally posted by kedaman
    Code:
    Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
    'Usage:
    fCreateShellLink "C:\windows\Desktop", "Link to my program", "C:\Path\Program.exe", ""

  4. #4
    Guest
    Here is the API function to make it work in VB5:

    Code:
    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

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    That's odd because it works fine for me, i have vb5. I guess you would need to have STKIT432.DLL
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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