首页  编辑  

Refesh Desktop

Tags: /超级猛料/OS.操作系统/任务栏/   Date Created:

I don't know if this will work - I haven't tried it, but effectively you

could hide and then show the listview on the desktop (the desktop icons

reside in a transparent listview)

function GetDeskHandle(ArrivingHandle:hwnd;lparam:lparam):boolean;

var

  cname:array[0..100] of char;

begin

    result:=true;

    getclassname(ArrivingHandle,cname,100);

    if cname='SysListView32' then

         DesktopListViewHandle:=ArrivingHandle;

end;

function GetDesktopListViewHandle: THandle;

begin

    Result := FindWindow('ProgMan', nil);

    DesktopListViewHandle:=0;

    enumchildwindows(Result,@GetDeskHandle,0);

    Result:=DesktopListViewHandle;

end;

procedure ShowDesktop(showit:boolean);

var

  wnd:hwnd;

begin

    wnd:=getdesktoplistviewhandle;

    if showit then

       showwindow(wnd,sw_shownormal)

    else

       showwindow(wnd,sw_hide);

end;

then just call ShowDesktop(false); ShowDesktop(true);