如何用VB建立快捷方式

  • 来源: www.knowsky.com 作者: sevenleaf   2010-04-21/15:02
  •       下面的代码向你演示在VB中如何创建一个快捷方式。

    PrivateDeclareFunctionfCreateShellLinkLib"STKIT432.DLL"(ByVallpstrFolderNameAsString,ByVallpstrLinkNameAsString,ByVallpstrLinkPathAsString,ByVallpstrLinkArgsAsString)AsLong
    SubCommand1_Click()

    DimlReturnAsLong

    '添加到桌面
    lReturn=fCreateShellLink("..\..\Desktop","ShortcuttoCalculator","c:\windows\calc.exe","")
    '添加到程序组
    lReturn=fCreateShellLink("","ShortcuttoCalculator","c:\windows\calc.exe","")
    '添加到启动组
    lReturn=fCreateShellLink("\Startup","ShortcuttoCalculator","c:\windows\calc.exe","")

    EndSub->


    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多