1 2 unit Unit1; 3 4 interface 5 6 uses 7 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 8 Dialogs, StdCtrls,Registry; 9 10 type 11 TForm1 = class(TForm) 12 Button1: TButton; 13 Button2: TButton; 14 procedure Button1Click(Sender: TObject); 15 procedure Button2Click(Sender: TObject); 16 private 17 { Private declarations } 18 public 19 { Public declarations } 20 end; 21 22 var 23 Form1: TForm1; 24 25 implementation 26 27 {$R *.dfm} 28 29 procedure ImageIE_On_Off(bDisplay : boolean); 30 const 31 DisplayInlineImages = 'Display Inline Images'; 32 var 33 sTmp : string; 34 begin 35 with TRegistry.Create 36 do 37 begin 38 RootKey := HKEY_CURRENT_USER; 39 OpenKey ('\Software\Microsoft\Internet Explorer\Main', True); 40 if bDisplay then 41 sTmp := 'yes' 42 else 43 sTmp := 'no'; 44 WriteString (DisplayInlineImages, sTmp); 45 Free; 46 end { with TRegistry.Create }; 47 end; 48 49 procedure TForm1.Button1Click(Sender: TObject); 50 begin 51 ImageIE_On_Off(true); 52 end; 53 54 procedure TForm1.Button2Click(Sender: TObject); 55 begin 56 ImageIE_On_Off(false); 57 end; 58 59 end. 60