3

I have several programs written in Delphi XE2 that were converted from Delphi 2005, which under Windows 7 would display horribly scaled icons when shortcuts were made on the Desktop.

Using IcoFX, I created a new icon containing the usual 4 sizes (256, 48, 32, 16) and went through my programs, going to the Appearance tab for each and loading the new icon.

After rebuilding them all, I switch Windows Explorer to Large Icons view and take a look at the programs in the Bin folder, but I found that only some of them show the new 256px icon. The others still show the smaller 48px one.

I've checked the Project options again, and they all seem to be the same, so I used Resource Hacker to look at the EXE's. All of them contain 4 icons, named 1, 2, 3, 4, of differing sizes, and they all contain an Icon Group with a MAINICON resource that includes all 4 sizes.

So I'm at a loss as to why some show Large Icons correctly while others don't. Anyone have any thoughts on this?

4

1 回答 1

8

听起来您正在体验 Windows 缓存您的图标。所有可执行文件在第一次显示时都会被 Windows 缓存其图标,因此如果您更改图标,Windows 仍将显示旧图标,因为它已被缓存。

您应该清除您的图标缓存。为此,您需要删除位于以下位置的隐藏系统文件夹中的文件:

C:\Users\User-Name\AppData\Local\IconCache.db

将“用户名”替换为您的用户配置文件文件夹的文件夹名称。删除此内容后,您必须注销并重新登录,或终止/重新启动该explorer.exe过程。执行此操作后,一切都应正确显示。

于 2013-11-08T00:11:30.277 回答