Re: Hide desktop icons

Posted by Jenny, DelphiLand Team on January 28, 2009

In Reply to Re: Hide desktop icons posted by Bobp12404 on January 26, 2009

: Make sure you have javascript enabled for your browser, then:

: htp://

: :), please don't take offense, but that was easy.

Thanks Bob, you're right. Here's a bit more background info for beginner level programmers:

The program with the title "Program Manager" is responsible for showing Windows' DeskTop icons. If you hide that program, then you hide the icons. You can hide the DeskTop icons with:

ShowWindow(FindWindow(nil, 'Program Manager'), SW_HIDE);

To show them again, use:

ShowWindow(FindWindow(nil, 'Program Manager'), SW_SHOW);

Note 1: after hiding the icons like this, the user can show them again with WinKey+D.

Note 2: if you've hidden the DeskTop icons, they will stay hidden after the end of your program. If you don't want that, show them again at the end of your application in the "OnDestroy" event of your main form:

procedure TForm1.FormDestroy(Sender: TObject);
ShowWindow(FindWindow(nil, 'Program Manager'), SW_SHOW);

Good luck and good programming!
Jenny, DelphiLand Team

Related articles


Follow Ups