我用的是WIN98的机子不知道为什么现在我桌面上和控制面板里的图标都重合在一起总是恢复不了
来源:百度知道 编辑:UC知道 时间:2024/06/28 21:31:40
问题出在图标缓存上,请按以下方法重建图标缓存
方法一:写段代码
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_US