AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > VB编程

利用 Visual Basic 建立快捷方式

51自学网 http://www.wanshiok.com
Private 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 Command1_Click()
Dim lReturn As Long
'添加到桌面
lReturn = fCreateShellLink("../../Desktop", "Shortcut to Calculator", "c:/windows/calc.exe", "")
'添加到程序组
lReturn = fCreateShellLink("", "Shortcut to Calculator", "c:/windows/calc.exe", "")
'添加到启动组
lReturn = fCreateShellLink("/Startup", "Shortcut to Calculator", "c:/windows/calc.exe", "")
End Sub

 

 

 
上一篇:Visual Basic 程序创建闪烁(标语)屏  下一篇:在 Visual Basic 中判断Windows9x的运行模式