如何在桌面上建圖標?

jinrui 2000-08-21 04:49:00
如何在桌面上建圖標?
代碼如何實現?
...全文
86 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shines77 2000-08-24
  • 打赏
  • 举报
回复
行吗?不行的话,我还有 iShellLink API....,你怎么了?
shines77 2000-08-21
  • 打赏
  • 举报
回复
VB源代码:
添加一个按钮Command1;
如果时候VB5.0请把dll库名改为Vb5stkit.dll;
如果是Win98,请把C:\winnt\system32改为C:\Windows;

Option Explicit

'NOTE: In Visual Basic 5.0, change Stkit432.dll in the following
'statement to Vb5stkit.dll.

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

'Add to Desktop
lReturn = fCreateShellLink("..\..\Desktop", _
"Shortcut to Calculator", "c:\Winnt\system32\calc.exe", "")

'Add to Program Menu Group
lReturn = fCreateShellLink("", "Shortcut to Calculator", _
"c:\Winnt\system32\calc.exe", "")

'Add to Startup Group

'Note that on Windows NT, the shortcut will not actually appear
'in the Startup group until your next reboot.
lReturn = fCreateShellLink("\Startup", "Shortcut to Calculator", _
"c:\Winnt\system32\calc.exe", "")

End Sub

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧