[英]How to get selected file in Windows Explorer window in C#?
I want to get the selected file or folder in the active explorer window and then pass it's path to my program,how do I do it? 我想在活动的资源管理器窗口中获取选定的文件或文件夹,然后将其路径传递给我的程序,该怎么办? for example I click on x.exe on windows explorer and then press CTRL+SHIFT+X hotkey and do something.I need my program to get this path. 例如,我在Windows资源管理器上单击x.exe,然后按CTRL + SHIFT + X热键并执行某些操作。我需要我的程序才能获取此路径。 I found a C++ solution but I can't figure out a C# solution for this.also I'm building a wpf application. 我找到了C ++解决方案,但无法为此找到C#解决方案。而且我还在构建wpf应用程序。
see here: https://stackoverflow.com/questions/7222749 看到这里: https : //stackoverflow.com/questions/7222749
there is already the C# code to find the desktop. 已经有用于查找桌面的C#代码。 This does not solve your exact issue but you can copy a lot of code and see how it works to detect the double click on the desktop :) 这不能解决您的确切问题,但是您可以复制很多代码,并查看它如何工作以检测桌面上的双击:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.