允许IE显示图片
下面的代码可以更改IE的设置,让IE显示网页中的图片或者不显示IE中的图片,以便提高速度,增加浏览器的性能。
procedure TViewIEImage.SetVisible(Visible: Boolean);
var
Reg: TRegistry;
Str: string;
begin
if Visible then
Str := 'yes'
else
Str := 'no';
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('\Software\Microsoft\Internet Explorer\Main',
False) then
Reg.WriteString('Display Inline Images', Str);
finally
Reg.CloseKey;
Reg.Free;
inherited;
end;
if BroadcastChange or Visible then
PostMessage(
HWND_BROADCAST,
WM_WININICHANGE,
0,
Longint(pchar('HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\Main')));
end;