Skip to content
Amal Hashim
All posts
Snippet

C# Show Desktop

Minimise all windows from C#, the same as clicking Show Desktop on the taskbar, using the Shell32 COM library.

1 min read#C##Windows

You can show the desktop from C#. It has the same effect as clicking the Show Desktop icon on the taskbar.

  1. Add a reference to Microsoft Shell Controls And Automation from the COM tab of the Add Reference dialog.
  2. Use this code.
csharp
Shell32.ShellClass shell = new Shell32.ShellClass();
shell.MinimizeAll();