일부 URL을 거부하는 IE BHO를 개발 중입니다. 하나의 타겟 URL을 발견하면 경고를 표시하는 웹 페이지 위의 iframe을 하나 열고 싶습니다. 사용자의 URL을 찾으려면 BeforeNavigate2 이벤트를 사용하고 있습니다. 대상 URL을 찾으면 iframe을 만듭니다. 그래서 지금의 코드는 다음과 같습니다? 모든 웹 사이트 위에 google.com에 iframe이를 열 생각하지만 그냥 IE 충돌 ... 누군가가 도움이-나를 수있는이 문제를 해결 것IE에 iFrame 삽입 BHO
procedure DoBeforeNavigate2(
const pDisp: IDispatch;
var URL: OleVariant;
var Flags: OleVariant;
var TargetFrameName: OleVariant;
var PostData: OleVariant;
var Headers: OleVariant;
var Cancel: WordBool
);
var
Document: IHTMLDocument2;
iFrame: IHTMLElement;
begin
Document:= IE.Document as IHTMLDocument2;
iFrame:= Document.createElement('iframe');
iFrame.setAttribute('src', 'http://www.google.com/', 0);
iFrame.setAttribute('id', 'iFrame', 0);
iFrame.setAttribute('style', 'position: fixed; left: 0px; top: 0px; border: 0px; width: 100%; height: 100%; background-color: white', 0);
end;
의 감사합니다!