本页主题: [求助]大家救救我的图标 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

JKHR007
级别: 骑士


精华: 1
发帖: 80
威望: 53 点
金钱: 163 静电币
支持度: 50 点
在线时间:69(小时)
注册时间:2003-08-26
最后登录:2011-08-17

 [求助]大家救救我的图标

我的系统图标自从装过一些主题后,再卸载之后,就再也不能正常显示了,都显示为未知文件的图标(例如IE和控制面版),但程序能正常使用,请问如何能把图标调会正常啊?
[ 此贴被JKHR007在2004-11-26 21:40重新编辑 ]
King
Posted: 2004-11-26 21:31 | [楼 主]
bbsriver
杀人游戏MVP勋章I 杀人游戏MVP勋章II
级别: 管理员


精华: 52
发帖: 17392
威望: 8730 点
金钱: 7074 静电币
支持度: 19101 点
在线时间:13725(小时)
注册时间:2002-11-21
最后登录:2016-12-22

 

Windows 的图标缓存被破坏了
可以使用 Tweak UI 或者 Icon Cache Rebuilder 等专门软件重建图标缓存
也可以手动删除图标缓存文件,再重启系统。win98 winme win2k中,该文件为 %systemroot%\ShellIconCache.db,winxp中,该文件为 %userprofile%\local settings\application data\IconCache.db
还有更复杂的解决方案:

Quote:
方法一:写段代码

Category: System


{
Microsoft's Tweak UI has a feature 'rebuild icon cache now'.
Windows then rebuilds its internal cache of icons.
Unfortunately, there is no single API to do this.
}

uses
Registry;

function RefreshScreenIcons : Boolean;
const
KEY_TYPE = HKEY_CURRENT_USER;
KEY_NAME = 'Control Panel\Desktop\WindowMetrics';
KEY_VALUE = 'Shell Icon Size';
var
Reg: TRegistry;
strDataRet, strDataRet2: string;

procedure BroadcastChanges;
var
success: DWORD;
begin
SendMessageTimeout(HWND_BROADCAST,
WM_SETTINGCHANGE,
SPI_SETNONCLIENTMETRICS,
0,
SMTO_ABORTIFHUNG,
10000,
success);
end;


begin
Result := False;
Reg := TRegistry.Create;
try
Reg.RootKey := KEY_TYPE;
// 1. open HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics
if Reg.OpenKey(KEY_NAME, False) then
begin
// 2. Get the value for that key
strDataRet := Reg.ReadString(KEY_VALUE);
Reg.CloseKey;
if sDataRet <> '' then
begin
// 3. Convert sDataRet to a number and subtract 1,
// convert back to a string, and write it to the registry
sDataRet2 := IntToStr(StrToInt(strDataRet) - 1);
if Reg.OpenKey(KEY_NAME, False) then
begin
Reg.WriteString(KEY_VALUE, strDataRet2);
Reg.CloseKey;
// 4. because the registry was changed, broadcast
// the fact passing SPI_SETNONCLIENTMETRICS,
// with a timeout of 10000 milliseconds (10 seconds)
BroadcastChanges;
// 5. the desktop will have refreshed with the
// new (shrunken) icon size. Now restore things
// back to the correct settings by again writing
// to the registry and posing another message.
if Reg.OpenKey(KEY_NAME, False) then
begin
Reg.WriteString(KEY_VALUE, strDataRet);
Reg.CloseKey;
// 6. broadcast the change again
BroadcastChanges;
Result := True;
end;
end;
end;
end;
finally
Reg.Free;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
RefreshScreenIcons
end;

{
The result is Window's erasing all its icons, and recalculating them
based on the registry settings.
This means if you have changed a DefaultIcon key within the registry for
some application or file, Windows will display the new icon when the
refresh is completed.

Original source:
www.mvps.org/vbnet/index.html?code/reg/screenrefresh.htm
Translated from VB by Thomas Stutz
}


编译执行。

方法二:

修改注册表:
对于以前的Win版本,一个众所周知的KEY: HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer 下新建 "MaxCachedIcons" REG_SZ "8000" (8000应该够了 吧),这个KEY 在Win2003中可能是没有效果的。
另一个KEY: HKCU \ Control Panel \ Desktop \ WindowMetrics 下的 Shell Icon Size 值放 大。
如果修改有效,接下来重建Icon Cache:
在显示属性中,如下图:

然后增大icon的size,如32->33,apply后再恢复到原来的size,再次确定。





source: http://www.blueidea.com/computer/system/2003/1175.asp
Posted: 2004-11-26 21:45 | 1 楼
勇者鼠
级别: 圣骑士


精华: 0
发帖: 205
威望: 15 点
金钱: 286 静电币
支持度: 0 点
在线时间:115(小时)
注册时间:2004-05-05
最后登录:2009-11-23

 

楼上这位强的
Posted: 2004-11-27 12:03 | 2 楼
JKHR007
级别: 骑士


精华: 1
发帖: 80
威望: 53 点
金钱: 163 静电币
支持度: 50 点
在线时间:69(小时)
注册时间:2003-08-26
最后登录:2011-08-17

 

不行啊!
King
Posted: 2004-11-29 19:21 | 3 楼
帖子浏览记录 版块浏览记录
狗狗静电BBS - wwW.DoGGiEhoMe.CoM » 电脑全方位 Computer Guide

沪ICP备05008186号
Powered by PHPWind Styled by MagiColor