PDA

View Full Version : Tool to hide icons from desktop



User137
14-04-2009, 08:16 PM
There it is, feel free to test:
http://uploading.com/files/27AGU9KJ/IconHide.zip.html

Controls:
- Program makes small icon to system tray where you can shut it down by right clicking.
- Move mouse to left side of screen and icons will reappear for short time until cursor moves away again or stops at them.
- Add command line option -toggle if you want to only run this tool to switch icons on/off or something goes wrong.
- App is controlled by TTimer with 1000 to 2000 interval, checking only cursor position making it very lightweight for cpu.

This project was based on http://www.geocities.com/autohide_hompage/Autohide.htm
but i found out it does not work well in every situation, and doing this myself i found out why. Fullscreen apps (or maybe just Windows key+D) like World of Warcraft lose touch on correct handle (which stays static and never change as long as explorer.exe runs), so i had to make check to use previous handle unless it goes to 0 and need to find out again.


procedure TForm1.ShowIcons(show: boolean);
var s: array[1..5] of byte;
begin
GetWindowText(h,PChar(@s),5);
if s[1]=0 then begin
h:=FindWindowA('Progman','Program Manager');
h:=GetWindow(h, GW_CHILD);
h:=GetWindow(h, GW_CHILD);
end;
if show then ShowWindow(h, SW_SHOWNOACTIVATE)
else ShowWindow(h, SW_HIDE);
end;

Wizard
14-04-2009, 08:41 PM
Very nice ;) It's hidden from task manager applications but not from processes ??? Your app works well, congrats! 8)

User137
23-04-2009, 04:05 PM
Tool polished somewhat and link is different:
http://uploading.com/files/C9PEW24X/IconHide.zip.html

Included through help file and actual behaviour is faster but even less resource taking than before. Few custom options available too.