双击桌面中的快捷方式时,如何在应用程序中获取快捷方式的名称? [英] How can I get shortcut's name in application when i doubleclick the shortcut in desktop?

查看:125
本文介绍了双击桌面中的快捷方式时,如何在应用程序中获取快捷方式的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从快捷方式获取参数,您可以通过API函数和Interop.IWshRuntimeLibrary获取它,如果在c#中知道快捷方式的名称;但是当更改快捷方式的名称时,它将不会获得参数请帮忙!谢谢

I want to get the param from a shortcut,you can get it by API function and Interop.IWshRuntimeLibrary if shortcut''s name is known in c#;But when the shortcut''s name is changed,it will not to get the param; please help !Thanks

推荐答案

您是否要获取命令行参数?

如果是这样,则可以使用Environment.CommandLineEnvironment.GetCommandLineArgs(),或者像这样声明您的Main方法:

Are you trying to get the command line parameters?

If so, you can use Environment.CommandLine or Environment.GetCommandLineArgs(), or declare your Main method like this:

static void Main( string[] args )



尼克



Nick


这篇关于双击桌面中的快捷方式时,如何在应用程序中获取快捷方式的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆