1. Home
  2. Computing & Technology
  3. Delphi Programming

Show / Hide Desktop icons

By Zarko Gajic, About.com

To hide or show all the icons on the Windows Desktop, use the following procedure...

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure ShowDesktop(const YesNo : boolean) ;
var h : THandle;
begin
  h := FindWindow('ProgMan', nil) ;
  h := GetWindow(h, GW_CHILD) ;
  if YesNo = True then
    ShowWindow(h, SW_SHOW)
  else
    ShowWindow(h, SW_HIDE) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» ListBox with a horizontal scroll bar
« Does my CD-ROM drive contain an audio CD?

Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2000 Delphi Tips
  7. Show / Hide Desktop icons

©2009 About.com, a part of The New York Times Company.

All rights reserved.