C# Show Desktop
Minimise all windows from C#, the same as clicking Show Desktop on the taskbar, using the Shell32 COM library.
You can show the desktop from C#. It has the same effect as clicking the Show Desktop icon on the taskbar.
- Add a reference to Microsoft Shell Controls And Automation from the COM tab of the Add Reference dialog.
- Use this code.
csharp
Shell32.ShellClass shell = new Shell32.ShellClass();
shell.MinimizeAll();