I’m developing a BHO to deny access in prohibited websites. So when I find a certain URL, I just open an iframe with the code below:
Document:= IE.Document as IHTMLDocument2;
iFrame:= Document.createElement('iframe');
iFrame.setAttribute('src', 'denied.html', 0);
iFrame.setAttribute('position', 'fixed', 0);
iFrame.style.width:= '100%';
iFrame.style.left:= '0px';
iFrame.style.top:= '0px';
iFrame.style.border:= '0px';
iFrame.style.height:= '100%';
(Document.body as IHTMLDomNode).appendChild(iFrame as IHTMLDomNode);
but this code just opens the iframe into a little space at the end of the website. How to overlap the entire website with the content of my iframe?
Set the position to absolute.