# Keyboard shortcut to hide/show desktop icons in windows 7?



## Dobbix666

Is there a keyboard shortcut to hide/show desktop icons in windows 7?


----------



## TwoCables

Actually, no. But you can use a really nifty/powerful (and small) program called AutoHotKey, and with this program you can make a script using the code below that will Show/Hide the icons when pressing the Plus key ("+") on the keypad:

Code:



Code:


numpadAdd::

ControlGet, HWND, Hwnd,, SysListView321, ahk_class Progman
If HWND =
ControlGet, HWND, Hwnd,, SysListView321, ahk_class WorkerW
If DllCall("IsWindowVisible", UInt, HWND)
WinHide, ahk_id %HWND%
Else
WinShow, ahk_id %HWND%

Return

To find out how to change "numpadAdd" so that you can use any key that you wish, visit the AutoHotKey message board:

http://www.autohotkey.com/forum/?sid...1ce8a2920d121b


----------



## Dobbix666

Thanks that worked


----------



## TwoCables

Quote:


Originally Posted by *Dobbix666* 
Thanks that worked

Oh cool. You're welcome!


----------



## chevalier

Quote:


> Originally Posted by *TwoCables*
> 
> Actually, no. But you can use a really nifty/powerful (and small) program called AutoHotKey, and with this program you can make a script using the code below that will Show/Hide the icons when pressing the Plus key ("+") on the keypad:
> 
> Code:
> 
> 
> 
> Code:
> 
> 
> numpadAdd::
> 
> ControlGet, HWND, Hwnd,, SysListView321, ahk_class Progman
> If HWND =
> ControlGet, HWND, Hwnd,, SysListView321, ahk_class WorkerW
> If DllCall("IsWindowVisible", UInt, HWND)
> WinHide, ahk_id %HWND%
> Else
> WinShow, ahk_id %HWND%
> 
> Return
> 
> To find out how to change "numpadAdd" so that you can use any key that you wish, visit the AutoHotKey message board:
> 
> http://www.autohotkey.com/forum/?sid...1ce8a2920d121b


Sorry for bumping this thread
This script is great, finally i found something useful with this autohotkey


----------



## TwoCables

Quote:


> Originally Posted by *chevalier*
> 
> Sorry for bumping this thread
> This script is great, finally i found something useful with this autohotkey


Nice! Thank you for taking the time to say so. Even though this thread is about 3½ years old, it's still cool to know when someone benefits!


----------



## BarryBGB

Quote:


> Originally Posted by *TwoCables*
> 
> Nice! Thank you for taking the time to say so. Even though this thread is about 3½ years old, it's still cool to know when someone benefits!


Thanks from me as well. I just found this after looking at a couple of different options for hiding the icons.
Never used AutoHotKey before and it took a few minutes to get the script to work but it works great.
Now I need to add this to my work computer.

BTW, I know how to use "it's and its" but I seem to use "then again" quite often.









Barry


----------



## TwoCables

Quote:


> Originally Posted by *BarryBGB*
> 
> Thanks from me as well. I just found this after looking at a couple of different options for hiding the icons.
> Never used AutoHotKey before and it took a few minutes to get the script to work but it works great.
> Now I need to add this to my work computer.
> 
> BTW, I know how to use "it's and its" but I seem to use "then again" quite often.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Barry


lol well, you know.... but then again... hehe

Anyway, this thread is a gift that keeps on giving. I love it. Thanks, Barry!


----------



## BarryBGB

Quote:


> Originally Posted by *TwoCables*
> 
> Actually, no. But you can use a really nifty/powerful (and small) program called AutoHotKey, and with this program you can make a script using the code below that will Show/Hide the icons when pressing the Plus key ("+") on the keypad:
> 
> Code:
> 
> 
> 
> Code:
> 
> 
> numpadAdd::
> 
> ControlGet, HWND, Hwnd,, SysListView321, ahk_class Progman
> If HWND =
> ControlGet, HWND, Hwnd,, SysListView321, ahk_class WorkerW
> If DllCall("IsWindowVisible", UInt, HWND)
> WinHide, ahk_id %HWND%
> Else
> WinShow, ahk_id %HWND%
> 
> Return
> 
> To find out how to change "numpadAdd" so that you can use any key that you wish, visit the AutoHotKey message board:
> 
> http://www.autohotkey.com/forum/?sid...1ce8a2920d121b


I tried to put this on my work laptop but it doesn't have a numpad + key that is easy to get to.

I tried your link to change the numpad but it only came up with just a forum list.

I did finally changed the key to WinZ using #Z:: instead of the numpad and it works great.

I found a tutorial page that shows several different key codes.
http://www.autohotkey.com/docs/Hotkeys.htm

thanks,


----------



## astorosup

Most places I found recommend hidedesktopicons.exe which wasn't working for me. I finally found a program here that fixes it. One click hide/show desktop icons.

http://www.actualtools.com/forum/read.php?FID=8&TID=1072


----------



## BarryBGB

Of all the places I looked, I found the AutoHotKey to be the easiest and it always work.
Since I changed the activation key of + that TwoCables posted, it is a matter of using one finger on both the Windows and Z keys.
I also placed the program in my Startup folder so it starts with windows.

I don't know if TwoCables wrote the script for hiding the icons but whoever did, my hat is off to you.
Also, there is so much more you can use "AutoHotKey" for.

Barry


----------



## TwoCables

Oh man, no I didn't write the script. I don't know where it came from, but it looks like I found it somehow. I don't even remember posting that.

These days, when I want to show or hide desktop icons, I just right-click the desktop, move my mouse a few millimeters away from the menu, and then press V, D. Simple.


----------



## SureIs

Windows Key + D (Show / Hide)

= )


----------

