程序代码: | [ 复制代码到剪贴板 ] |
Imports IWshRuntimeLibrary '引用:Windows Script Host Object Model
Private Sub CreateLnk()
On Error Resume Next
Dim WshShell As Object
Dim oShellLink As Object
Dim strDesktop As String
WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
oShellLink = WshShell.CreateShortcut(strDesktop & "田草博客.lnk")
oShellLink.TargetPath = "http://www.tiancao.net"' 文件再文件名的详细路径
oShellLink.WindowStyle = 7 '启动样式,1为普通,3最大化,7最小化
'oShellLink.Hotkey = "CTRL+SHIFT+F" '快捷键
oShellLink.IconLocation = "C:\WINDOWS\tc.ico" '图标
oShellLink.Description = "田草博客" '说明
oShellLink.WorkingDirectory = "C:\WINDOWS" '工作目录
oShellLink.Save() '把快捷方式存到磁盘上
End Sub
Private Sub CreateLnk()
On Error Resume Next
Dim WshShell As Object
Dim oShellLink As Object
Dim strDesktop As String
WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
oShellLink = WshShell.CreateShortcut(strDesktop & "田草博客.lnk")
oShellLink.TargetPath = "http://www.tiancao.net"' 文件再文件名的详细路径
oShellLink.WindowStyle = 7 '启动样式,1为普通,3最大化,7最小化
'oShellLink.Hotkey = "CTRL+SHIFT+F" '快捷键
oShellLink.IconLocation = "C:\WINDOWS\tc.ico" '图标
oShellLink.Description = "田草博客" '说明
oShellLink.WorkingDirectory = "C:\WINDOWS" '工作目录
oShellLink.Save() '把快捷方式存到磁盘上
End Sub
【创建桌面快捷方式.rar】点击下载此文件
[本日志由 tiancao1001 于 2012-04-28 08:53 PM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |