var
Handle: THandle;
begin
Handle := FindWindow('progman', 'Program Manager');
Handle := GetTopWindow(Handle);
Handle := GetTopWindow(Handle);
ShowWindow(Handle, SW_HIDE);
end;
This will hide the actual listView that displays the icons. It will allow right clicks to continue working so a refresh can be done etc...
TO hide it and disable the right click on the desktop do it like this
var
Handle: THandle;
begin
Handle := FindWindow('progman', 'Program Manager');
//Handle := GetTopWindow(Handle);
//Handle := GetTopWindow(Handle);
ShowWindow(Handle, SW_HIDE);
end;
This completely disables the desktop.
You will have to manually call this again with SW_SHOW
to bring it back