Search Tools Links Login

Create Shortcuts (Links to other Files/Folders)

Visual Basic 6, or VB Classic

When i started to program, i REALLY wanted to know how to make shortcuts to files and folders... With the use of vb5stkit.dll its pretty easy. To make it really simple to use, i have put all the code into a module.
If you don't have the dll, I have included the dll in the zip as "Vb5stkit.renametoDLL" so make sure you rename it and put it in your system directory!
Hope this is very usefull for you all.

Original Author: Daniel Davies

API Declarations

Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String) As Long
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String ' only used if FOF_SIMPLEPROGRESS
End Type
Private Const FO_MOVE = &H1

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 92 times


Visual Basic 6


Posted: 9/3/2020 3:45:00 PM
Size: 16,976 bytes

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.