可以调用API或者VB5里面的vb5stkit.dll中的fCreateShellLink
函数,但是更简单的是使用控件,到此地址下载
http://www.megv.net/temp/shortcut.zip

解决方案 »

  1.   

    代码如下:
    Declare Function OSfCreateShellGroup Lib "STKIT432.DLL" Alias "fCreateShellFolder" _ 
    (ByVal lpstrDirName As String) As LongDeclare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal _
    lpstrFolderName As String, ByVal lpstrLinkName As String, _
    ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As LongPublic Sub CreateShellGroup(ByVal strFolderName As String)If strFolderName = "" Then
    Exit Sub
    End IfDim fSuccess As Boolean
    fSuccess = OSfCreateShellGroup(strFolderName)End Sub
    'use asDim res&
    Dim vLocation$vLocation$ = "testing"
    Call CreateShellGroup(vLocation$)
    vLocation$ = "..\..\Start Menu\Programs\" & vLocation$
    res& = fCreateShellLink(vLocation, [title], [path&executable], "")'where
    ' title = name to be mentioned
    ' path&executable = full path and executable name of application
      

  2.   

    一般都利用installshield等安装文件