简体   繁体   English

将字符串从Windows上下文菜单传递给clickonce应用程序

[英]Pass a string from Windows Context menu to clickonce application

I am creating a small program to do some file renaming through a right click in windows explorer. 我正在创建一个小程序,通过在Windows资源管理器中单击鼠标右键来重命名文件。

I am trying to pass the folder name of a right clicked folder to a clickonce application that hasn't been opened yet. 我正在尝试将右键单击的文件夹的名称传递给尚未打开的clickonce应用程序。

I would like the application to launch with the folder path filled into a textbox. 我希望应用程序启动时将文件夹路径填充到文本框中。

Where exactly in my code to I catch this incoming data. 我在我的代码中确切捕获了这些传入数据的位置。

I know I can launch the program through "HKEY_CLASSES_ROOT\\Directory\\shell\\"Appname"\\command" with the %1 modifier, but where does that argument come out on the other end? 我知道可以使用带有%1修饰符的“ HKEY_CLASSES_ROOT \\ Directory \\ shell \\“ Appname” \\ command”启动程序,但是该参数的另一端出现在哪里?

要获取传递给ClickOnce应用程序的参数,请使用AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM