在线帮助 ICP备案 合作机构 我要订制
 
 7×24客服热线:13663712063
您的位置:首页  技术支持 C# 建立快捷方式
       越辰家政管理软件
       越辰空调售后管理软件
       越辰图书销售管理软件
       越辰物业管理软件
       越辰茶楼管理软件
       越辰幼儿园管理软件
       越辰餐饮管理软件
       越辰病历管理系统
       越辰洗浴管理软件
       越辰住院管理系统
       越辰超市管理系统
  

C# 建立快捷方式

来源:yocin  时间:2012-4-7 18:30:34  栏目:技术支持  点击率:991

private void CreateLink(string linkName, string ExeName,string Description)

{

WshShell shell = new WshShell();

IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(linkName);

shortcut.TargetPath = ExeName;

shortcut.WorkingDirectory =Path.GetDirectoryName(ExeName);

shortcut.WindowStyle = 1;

shortcut.Description = Description;

shortcut.IconLocation = System.Environment.SystemDirectory + "\\" + "shell32.dll, 165";

shortcut.Save();

}

private void button3_Click(object sender, EventArgs e)

{

CreateLink(Application.StartupPath + "/两权发证.lnk", @"D:\temp\安徽\安徽.mxd", "两权发证");

//WshShell shell = new WshShell();

//IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(

// Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) +

// "\\" + "Allen's Application.lnk"

// );

//shortcut.TargetPath = System.Reflection.Assembly.GetExecutingAssembly().Location;

//shortcut.WorkingDirectory = System.Environment.CurrentDirectory;

//shortcut.WindowStyle = 1;

//shortcut.Description = "Launch Allen's Application";

//shortcut.IconLocation = System.Environment.SystemDirectory + "\\" + "shell32.dll, 165";

//shortcut.Save();

}

Copyright ◎2008-2018郑州越辰科技有限公司 版权所有 网站地图
地址:中国·河南郑州市文化路交北环路北晨e时代B座505室 
电话:0371-63399049 13663712063 备案号:豫ICP备19031456号
我们专注于 软件开发| 网站制作  返回欢迎页 
  
点击这里给我发消息 越辰业务
点击这里给我发消息 越辰业务
点击这里给我发消息 越辰代理
点击这里给我发消息 越辰技术
 ,页面执行时间:15.625毫秒        
up close

返回顶部

越辰科技微信
微信扫一扫