本文介绍了Windows上下文菜单 - 项目的可见性(如果剪贴板包含文本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在app上处理复制和粘贴文件名。我已经有一个带有小子应用程序的工作上下文菜单(用c#编写),但我想只有当剪贴板包含一些文本时才会看到粘贴选项。怎么做?可以通过向注册表添加内容吗?
我尝试过:
我不知道。下面的Windows注册表中的键。
注册表项上下文菜单:
[HKEY_CLASSES_ROOT \ * \ shell * \\ CopyPasteFileName]
SubCommands=cfn; cfp; pfn; pfnne
icon=C:\\Users\\KN \\Desktop \\files \\\\icon .ico
位置=底部
粘贴文件名密钥:
[ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows \ CurrentVersion\Explorer \ CommandStore \shell \ pfn]
@ =粘贴文件名
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion\Explorer \CommandStore \shell\pfn\command]
@ =C:\\Program Files \\CopyPasteFileName \\ pfn.exe \ %1 \
其他菜单项有类似的键
解决方案
Screen
I work on app to copy and paste filenames. I already have a working context menu with little subapps (written in c#), but I would like to that paste options will be visible only if clipboard contains some text. How to do it? Is it possible by add something to registry?
What I have tried:
I have no idea. Keys in Windows registry below.
Registry key context menu:
[HKEY_CLASSES_ROOT\*\shell\CopyPasteFileName] "SubCommands"="cfn;cfp;pfn;pfnne" "icon"="C:\\Users\\KN\\Desktop\\files\\icon.ico" "Position"="Bottom"
Paste filename keys:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\pfn] @="Paste Filename" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\pfn\command] @="C:\\Program Files\\CopyPasteFileName\\pfn.exe \"%1\""
Other menu items have similar keys
解决方案
这篇关于Windows上下文菜单 - 项目的可见性(如果剪贴板包含文本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!