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?

Explore Delphi Programming

More from About.com

  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

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

All rights reserved.