Home » Questions » Computers [ Ask a new question ]

Is there a Windows 7 keyboard shortcut to change the desktop background?

Is there a Windows 7 keyboard shortcut to change the desktop background?

With all of the new keyboard shortcuts added to Windows 7, I was wondering if a shortcut had been added to change the Desktop Background when the theme was setup to work as a slide show.

Asked by: Guest | Views: 321
Total answers/comments: 2
Guest [Entry]

"Not that I know, but it can be fixed with an AutoHotkey script. For instance, this will use Win+n to go to the next desktop background:

#n:: ; use the Windows+n hotkey
WinActivate, ahk_class Progman ; activate the Desktop
MouseGetPos, xpos, ypos ; get current mouse position
Click 0,0 ; click in the corner of the desktop, to unselect any selected icon
Send +{F10} ; send Shift+F10, the shortcut for right-click
Send n ; send ""n"", the key for ""next desktop background""
Click %xpos%, %ypos%, 0 ; put the mouse back at its previous position
return ; done!

The ""n"" in Send n is only valid for an English Windows 7 (Next desktop background). You'll have to change it if your Windows 7 is not in English to match the underlined key."
Guest [Entry]

"WinActivate, ahk_class Progman

doesn't seem to work if Microsoft Visual Studio is running maximized, a real shame. Other than that it works fine.

Edit: the following works fine, but flashes the desktop. Pros and cons to all I guess.

#n:: ; Use the Windows+n hotkey
Send #d ; Switch to the Desktop
MouseGetPos, xpos, ypos ; Get current mouse position
Click 0,0 ; Click in the corner of the desktop, to unselect any selected icon
Send +{F10} ; Send Shift+F10, the shortcut for right-click
Send n ; Send ""n"", the key for ""next desktop background""
Click %xpos%, %ypos%, 0 ; Put the mouse back at its previous position
Send #d ; Switch away from the Desktop again
return ; Done!"