如何在C#应用程序中使用SHELL32? [英] How to use Shell32 within a C# application?

查看:784
本文介绍了如何在C#应用程序中使用SHELL32?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该包括C#应用程序中,为了使SHELL32工作?

编辑:

我的应用程序不能识别SHELL32。我应该包括什么参考或LIB?我试图做的是:

  Shell32.Shell壳=新Shell32.Shell();

什么我得到是一个错误:


  

错误1类型或命名空间名称SHELL32'找不到(是否缺少using指令或程序集引用?)



解决方案

只是添加引用的Shell32.dll 形成的Windows / SYSTEM32 文件夹,并使用它:

  Shell32.Shell壳=新Shell32.Shell();
shell.MinimizeAll();

What should I include within a C# application in order to make Shell32 work?

Edit:

My application can't recognize shell32. What references or lib should I include? What I'm trying to do is:

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

What I'm getting as an error:

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

解决方案

Just Add Reference to Shell32.dll form the Windows/system32 folder and use it:

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

这篇关于如何在C#应用程序中使用SHELL32?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆