Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
能够在系统范围内切换隐藏文件夹和文件的最佳方法是什么?我宁愿用 C# 来做。我知道我会使用全局键盘挂钩,但我不确定如何将文件夹/文件切换为隐藏,然后在按下快捷键时显示。任何帮助表示赞赏。谢谢。
使用注册表取消隐藏它:
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ Advanced] Value Name: Hidden Data Type: REG_DWORD (DWORD Value) Value Data: (1 = show hidden, 2 = do not show)
然后向桌面发送一个 SHChangeNotify 事件。