unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, ComObj, SHDocVw, ActiveX, Registry, StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> appIE : TInternetExplorer ;<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br><br>function IERestrictionsSettings(Key: string; Disabled: Boolean): Boolean;<br>var<br> reg: TRegistry;<br>begin<br> Result := TRUE;<br> Reg := TRegistry.Create;<br> with Reg do try<br> RootKey := HKEY_CURRENT_USER;<br> OpenKey('Software/Policies/Microsoft/Internet Explorer/Restrictions', True);<br> WriteInteger(Key, Integer(Disabled));<br> CloseKey;<br> except<br> Result := FALSE;<br> end;<br> Reg.Free;<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>// appIE := CreateOLEObject('InternetExplorer.Application') ;<br> appIE := TInternetExplorer.Create(self) ;<br> appIE.Visible := true ;<br> appIE.Navigate('http://www.delphibbs.com');<br> IERestrictionsSettings('NoBrowserContextMenu', true);<br>end;<br><br>initialization<br> OleInitialize(nil);<br>finalization<br> try<br> OleUninitialize;<br> except<br> end;<br><br>end.<br>