Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Apr : Controlling desktop icons

www.cryer.info
Managed Newsgroup Archive

Controlling desktop icons

Subject:Controlling desktop icons
Posted by:"Ofer Leshem" (of..@leshem.org.il)
Date:17 Apr 2005 00:36:30

Hello there,

I want to develop application allow me to disappear and appear the icons of the desktop.
I am using this 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;
{---------------------}

It works great. But I am using it with 2 other components : the first one is to create tray icon, and the second one is to catch hotkey. When the application is "normal" minimized it works great - but when the application is minmized using the desktop icon or Windows key + D - the procedure is not disappear the icons although the other 2 components works great (I ask it to beep when the hotkey is pressed).
Can you plese let me know what I need to change in this procedure ?

Thanks and regards,
Ofer

Replies:

www.cryer.info
Managed Newsgroup Archive