Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Shell32 within a C# application?

Tags:

c#

shell32

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?)

like image 479
Lisa Avatar asked Apr 18 '11 20:04

Lisa


1 Answers

Just add a reference to Shell32.dll from the Windows\System32 folder and use it:

Shell32.Shell shell = new Shell32.Shell(); shell.MinimizeAll(); 
like image 135
Vasiliy Ermolovich Avatar answered Sep 24 '22 22:09

Vasiliy Ermolovich