b. Popup-killers
Browser helper object is an excellent place to avoid annoying popup-windows from ever being displayed. Here is a simple one-line popup-killer:
procedure DoBeforeNavigate2(const pDisp: IDispatch;
var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant;
var PostData: OleVariant; var Headers: OleVariant; var Cancel: WordBool);
begin
if IE.Toolbar=0 then IE.Quit;
end;
If the window about to be displayed does not have a toolbar then kill it! It is simple, but it works. The code could be extended to evaluate the size of the window, the title and url before deciding to show or destroy it.