sw: IShellWindows;
disp:IDispatch;
ie: IWebBrowser2;
i:integer;
Begin
sw := CoShellWindows.Create;
for i := 0 to sw.count - 1 do
begin
disp := sw.item(i);
disp.QueryInterface(IWebBrowser2, ie);
if ie <> nil then
Begin
If UpperCase(ExtractFileName(IE.FullName))<>'IEXPLORE.EXE' then continue;
Ie.AddressBar:=Flag;
Ie.MenuBar:=Flag;
IE.ToolBar:=0
End;//if ie
end;//for