在 .NET 中创建快捷方式 [C#]
2005-09-01 22:08
323 查看
在 .NET 中创建快捷方式 [C#]
Creating Shortcuts in .NET [C#]
Written by Allen Lee
// Code #01
using System;
using IWshRuntimeLibrary;
class Program
// Code #02
shortcut.Arguments = "/out:output.txt /sortby:date /desc";
shortcut.Hotkey = "CTRL+ALT+F11";
注意:Hotkey 属性的值里面不能包含空格。
你可以在应用程序里面像平常那样处理命令行参数:
// Code #03
class Program
// Output:
//
// /out:output.txt
// /sortby:date
// /desc
现在,你把这个快捷方式放到桌面,每当你需要运行的时候,轻轻的按下 CTRL+ALT+F11 就行了,Cool ~ ~ ~
Appendix A
Mattias Sjogren 创建了一个名叫 ShellShortcut 的包装类(wrapper class),你可以在你的项目中直接使用它。有兴趣的话,你也可以对其进行一番研究。
Creating Shortcuts in .NET [C#]
Written by Allen Lee
// Code #01
using System;
using IWshRuntimeLibrary;
class Program
// Code #02
shortcut.Arguments = "/out:output.txt /sortby:date /desc";
shortcut.Hotkey = "CTRL+ALT+F11";
注意:Hotkey 属性的值里面不能包含空格。
你可以在应用程序里面像平常那样处理命令行参数:
// Code #03
class Program
// Output:
//
// /out:output.txt
// /sortby:date
// /desc
现在,你把这个快捷方式放到桌面,每当你需要运行的时候,轻轻的按下 CTRL+ALT+F11 就行了,Cool ~ ~ ~
Appendix A
Mattias Sjogren 创建了一个名叫 ShellShortcut 的包装类(wrapper class),你可以在你的项目中直接使用它。有兴趣的话,你也可以对其进行一番研究。
相关文章推荐
- 在 .NET 中创建快捷方式 [C#]
- 在 .NET 中创建快捷方式 [C#][转载]
- 在 .NET 中创建快捷方式 [C#]
- 使用C#创建webservice及三种调用方式_.NET教程
- C#实现在启动目录创建快捷方式的方法
- [No000074]C#创建桌面快捷方式
- 在C#2005中创建快捷方式
- 如何使用C#操作快捷方式(获取快捷方式属性、创建快捷方式)
- C# 创建快捷方式
- 使用C#创建快捷方式
- C#创建带中文路径的快捷方式文件
- c#创建快捷方式到快速启动栏
- Windows服务System权限下在当前用户桌面创建快捷方式C#实例程序
- C#程序打包安装部署之创建快捷方式
- 使用C#创建快捷方式
- C#创建一个文件的快捷方式
- 用C# 创建快捷方式
- 在 .NET 中创建快捷方式
- C# 创建桌面快捷方式【转】
- C#创建快捷方式