Scott Hanselman

How to make Vista Taskbar Previews and ALT-TAB Thumbnails Bigger

December 18, '07 Comments [5] Posted in Musings | Tools
Sponsored By

As monitor resolutions get higher and higher I wish I could scale certain things in Vista more and more. I run with Large Icons, but I still have to look at tiny ALT-TAB Preview Windows and tiny Taskbar Previews.

Turns out both these problems have been solved. One with a registry key, and one with a deliciously evil (in a good way) hack.

How to make ALT-TAB Thumbnails Bigger

Jeff solved this one for me with this registry file. Save it to a .reg file and run as Administrator:

Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTab]
"OverlayIconPx"=dword:00000023
"OverlayIconDXPx"=dword:00000000
"OverlayIconDYPx"=dword:00000000
"ThumbSpacingXPx"=dword:00000004
"ThumbSpacingYPx"=dword:00000004
"SideMarginPx"=dword:00000004
"BottomMarginPx"=dword:0000000a
"MinThumbSizePcent"=dword:00000064
"MinWidthPx"=dword:0000012c
"TopMarginPx"=dword:00000020
"MaxThumbSizePx"=dword:000000dc
"MaxIconSizePx"=dword:0000015e
"TextBottomPx"=dword:000001f4

I've also tightened up the borders and margins a bit, to make room for larger thumbnails. However, before importing this into your registry you must edit the MaxThumbSizePx to a size that works on your monitor first! The current value, above, is DC hex or 220 decimal, which works on my 1600 x 1200 primary monitor. The maximum row size is 7, so each row is 7 x 220 = 1540, right under the 1600 width.

Stunning. Thanks. That's Problem #1.

How to make Taskbar Thumbnail Previews Bigger

Unfortunately it seems that Explorer has hardcoded the Taskbar Preview Thumbnail size, but you can use Andreas Verhoeven's Thumbnail Sizer to change the internal value at runtime by loading his DLL into Explorer where he will overwrite that spot in memory. I didn't say it wouldn't hurt, but it works great on my machine and he has both 32-bit and 64-bit versions.

He also includes source, but if you want to build it on Visual Studio 2005 or 2008 you'll need to download WTL 8.0 (his app is in C++) and change both the include paths and the resource include paths. Also note he's hardcoded the output path for the app if you find yourself hunting for it. Of course, you can always just go to his site and download the binaries. Click on the picture of each app for the associated zip. Also note his PayPal Donation button at the top of his page if you like his stuff!

Here's a taste of his very simple source. Ah, the good old days. Of course, the magic here is the value of THUMBNAIL_MAX_CX_OFFSET that I'm sure took a long while to find.

// sets the maximum thumbnail size.
BOOL CThumbnailSizer::putThumbnailSizes(DWORD maxCX, DWORD maxCY)

{     // idem as getThumbnailSizes(), but for writing the size instead     // of reading.

    HWND hwnd = getTaskBandHandle();     if(NULL == hwnd)
        return FALSE;

    BYTE* data = (BYTE*)GetWindowLong(hwnd, 0);
    if(NULL == data)
        return FALSE;

    DWORD dwPid = -1;
    GetWindowThreadProcessId(hwnd, &dwPid);
    if(dwPid <= 0)
        return FALSE;

    HANDLE hProc = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE, NULL, dwPid);
    if(NULL == hProc)
        return FALSE;

    SIZE_T numWritten=0;
    WriteProcessMemory(hProc, data + THUMBNAIL_MAX_CX_OFFSET, &maxCX, sizeof(DWORD), &numWritten);
    WriteProcessMemory(hProc, data + THUMBNAIL_MAX_CY_OFFSET, &maxCY, sizeof(DWORD), &numWritten);

    CloseHandle(hProc);

    return TRUE;
}

Fabulous. Problem #2 solved. By the way, while you're over there, pick up his 3D User Picture applet - it almost needs to be seen to be believed. Brilliant.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Tuesday, December 18, 2007 1:43:58 PM UTC
Hey Now Scott,
This is good to know. Something that I use everyday all day, it's a nice tweek. We got the screen space we might as well use it. For some reason I still use the alt-tab not win-tab since the win-tab seems to take a 1/2 a second extra.
Hanselminutes fan,
Catto
Tuesday, December 18, 2007 3:18:33 PM UTC
Is there a way to go back to the Windows XP style ALT-TAB display? It seems kind of pointless to ALT-TAB through a bunch of screen captures when no matter how much you blow them up, it's still impossible to read or see anything of worth. I prefer Application Names and Window Titles.
Eric
Tuesday, December 18, 2007 5:44:03 PM UTC
Hi Scott,
Thanks for the patch. For my 1440 x 900 monitor, I use
"MaxThumbSizePx"=dword:000000c0
to give a good fit.

Ciao,
Tim
Tim
Wednesday, December 19, 2007 4:22:17 PM UTC
Hi Scott,

I don't have this issue but often have to deal with this in my family tech support staff role. Can you (or anyone else) tell me (or write a post) about everything that you do in Vista (and XP?) to use a new hi-res monitor. I have my 78 year-old father's computer (22" wide screen) all crapped up, running at a lower res and using large icons, large fonts, etc., so that he can use it and I still had to set IE to zoom to (125%) since many web pages ignore the browsers font size setting.

Do think I could possible include any more (extraneous) comments in parthesis ;-)

Regards,
Jim
Jim Clark
Friday, January 18, 2008 12:57:28 PM UTC
If you want Windows XP style alt-tab in Windows Vista:

http://www.mattbrindley.com/developing/windows/windows-vista-win-tab-alt-tab/

Quote:

"Create a DWORD called "AltTabSettings" in \HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer and set it to 1."
lanfear
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.