首页  编辑  

删除桌面所有图标并且保留菜单

Tags: /超级猛料/OS.操作系统/桌面/   Date Created:

怎么才能隐藏桌面上的图标,而桌面右键菜单不被屏蔽?

var

 wnd:HWND;

begin

 Wnd := GetDesktopWindow;

 Wnd := FindWindowEx(Wnd, 0, 'Progman', nil);

 Wnd := FindWindowEx(Wnd, 0, 'SHELLDLL_DefView', nil);

 Wnd := FindWindowEx(Wnd, 0, 'SysListView32', nil);

 SendMessage(wnd, LVM_DELETEALLITEMS, 0, 0)

end;