c#通过纯代码创建桌面快捷方式、创建程序菜单项、将网页添加到收藏夹
本文章源代码Src下载地址:http://download.csdn.net/detail/testcs_dn/5141580
开始菜单》程序菜单项:
添加到收藏夹:
相关函数代码:
public const int SW_SHOWNORMAL = 1;
/// <summary>
/// 创建快捷方式。
/// </summary>
/// <param name="shortcutPath">快捷方式路径。</param>
/// <param name="targetPath">目标路径。</param>
/// <param name="workingDirectory">工作路径。</param>
/// <param name="description">快捷键描述。</param>
public static bool CreateShortcut(string shortcutPath,string targetPath,string workingDirectory,string description,string iconLocation = null)
{
try
{
CShellLink cShellLink = new CShellLink();
IShellLink iShellLink = (IShellLink)cShellLink;
iShellLink.Se
原文地址:https://blog.csdn.net/testcs_dn/article/details/8674265
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。