The problem lies within lazy programming within the VCL not fitting with the behavioral change of the OS. More or less it is like this;
TCustomForm.CreateWnd, after the window handle is created, calls;
SendMessage(Handle, WM_SETICON, 1, LPARAM(GetIconHandle)) else
Notice the "1" in place of wParam, that's ICON_BIG. Actually the VCL sets the large icon of the form. But the icon's requested size (TIcon.FRequestedSize) is 16x16 (by default), and so the TIcon of the form returns a handle for the small icon. That's the size for the system small icon and is determined in the constructor CreateNew with calls to GetSystemMetrics.
Since earlier versions of Windows used the small icon on the taskbar this was no problem. Hovewer the Alt+Tab dialog had the problem other way around; if an icon was assigned to a form it showed "blurred" in the Alt+Tab dialog. Anyway, Windows 7, still, by default returns 16x16 for the small icon (SM_CXSMICON/SM_CYSMICON) and 32x32 for the large icon (SM_CXICON/SM_CYICON), but the large taskbar displays the large icon, if there is one that is..
The correct approach would be to assign a large image (if there is one in the icon) for the large icon and assign a small image (if there is one) to the small icon. Granted, since the sizes would not have to have exact matches, this would require a complex algorithm. Instead, a simpler but broken design is implemented.
For a workaround, I don't assign an icon to the forms in the OI and instead use this;
procedure SetFormIcons(FormHandle: HWND; SmallIconName, LargeIconName: string);
var
hIconS, hIconL: Integer;
begin
hIconS := LoadIcon(hInstance, PChar(SmallIconName));
if hIconS > 0 then begin
hIconS := SendMessage(FormHandle, WM_SETICON, ICON_SMALL, hIconS);
if hIconS > 0 then
DestroyIcon(hIconS);
end;
hIconL := LoadIcon(hInstance, PChar(LargeIconName));
if hIconL > 0 then begin
hIconL := SendMessage(FormHandle, WM_SETICON, ICON_BIG, hIconL);
if hIconL > 0 then
DestroyIcon(hIconL);
end;
end;
and include an "icons.res" with named icons having 16x16 and 32x32 images, in the project. All the forms in their OnCreate call
SetFormIcons(Handle, 'MYFORM', 'MYFORM');