Private Sub Form_Load()
Dim StrURLFileName As String
Dim StrURLTarget As String
Dim lngFileNum As Integer
StrURLFileName = "C:\码农库.url"
StrURLTarget = "http://www.manongku.com" '地址
lngFileNum = FreeFile
'写Internet 快捷方式文件
Open StrURLFileName For Output As #lngFileNum
Print #lngFileNum, "[InternetShortcut]"
Print #lngFileNum, "URL=" & StrURLTarget
Close #lngFileNum
Call Shell("EXPLORER.EXE /n,/e," + "c:\", vbNormalFocus)
End Sub
如果要放桌面,就参考下 《VB6 API获取全部系统路径参数》。