# Re: 应该可能

Posted by 阿甘 on April 23, 1999 at 16:44:47:

In Reply to: Re: 应该可能 posted by 默默 on April 23, 1999 at 16:20:27:

: '这是我自己试的结果 , 应该是可以的
: '请先将vb6 or VB6的光碟片中找到shelllnk.vbp开启之后编译成shelllnk.dll
: '然后include这个dll (名称为pShelllnk)

: Dim linkfile As New cShellLink
: Dim WinPath As String
: WinPath = "C:\Windows" '或是call API抓出windows path

: linkfile.CreateShellLink WinPath + "\desktop\notepad.lnk", WinPath + "\notepad.exe", "c:\windows", "", WinPath + "\notepad.exe", 1, SHOWNORMAL

: '这样就可以把记事本的捷径加到桌面上
: '不知道是不是你所想要的? :)
: 'ps. 可以参考王国荣先生的VB6与API讲座该书,我是参考它作出来的:)

我在外国网站search 到example 供各位参考

Public Declare Function fCreateShellLink Lib "STKIT432.DLL" _
(ByVal lpstrFolderName As String, _
ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, _
ByVal lpstrLinkArgs As String) As Long

Sub Main()
Dim x
Dim lResult As Long
lResult = fCreateShellLink("..\..\Desktop", "Partlist System", "\\PRDSER\VOL1\KEVIN\PARTLIST.exe", "")
end Sub

Follow Ups: