c# - 如何在 C# 应用程序中使用 Shell32?

标签 c# shell32

为了使 Shell32 工作,我应该在 C# 应用程序中包含什么?

编辑:

我的应用程序无法识别 shell32。我应该包括哪些引用资料或库?我想做的是:

Shell32.Shell shell = new Shell32.Shell(); 

我收到的错误信息:

Error 1 The type or namespace name 'Shell32' could not be found (are you missing a using directive or an assembly reference?)

最佳答案

只需从 Windows\System32 文件夹中添加对 Shell32.dll 的引用并使用它:

Shell32.Shell shell = new Shell32.Shell();
shell.MinimizeAll();

关于c# - 如何在 C# 应用程序中使用 Shell32?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5708434/

相关文章:

c# - 使用 LINQ 按多个属性分组并求和

ms-office - Internet 快捷方式 IDList 值解码

java - 获取打开的窗口和选定的项目时出现错误 com4j.ComException : 80004005 .\invoke.cpp:51

c# - 在 C# 中按大写字母拆分字符串的最佳方法是什么?

c# - 如何确保接收到整个数据包

c# - 为什么 Process.GetProcessesByName() 总是空的?

c# - 来自带时区的SQL Server中的DateTime

winapi - 获取 Windows 上任何用户的 CSIDL_LOCAL_APPDATA 路径

c# - 为什么我在通过 Shell32 读取公共(public)快捷方式时得到 E_ACCESSDENIED?

c# - 再次引用shell32,C# Visual Studio