Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: .NET
Expertise: Intermediate
May 25, 2016

Adding a ShowDesktop Feature to Your Applications

The following code makes use of the Shell32 .Shell class to minimize all open windows, similar to what the Show Desktop button on the taskbar does. This also hides all open dialogboxes.

namespace ShowDesktop
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private static Shell32.Shell shellInterface = new Shell32.Shell(); 
        private void button1_Click(object sender, EventArgs e)
        {
            shellInterface.MinimizeAll(); 

        }
    }
}
Hannes du Preez
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date