现在知道的方法有两个
procudure Form1.WebBrowser1OnDocumentcomplete(....)
begin
if WebBrowser1.busy then exit;
if WebBrowser1.Stats <> Complete then exit;
//~~~~~~~~~~~~~第二句话具体怎么写忘了。
end;请问各位兄弟 还有没什么其它方法,
最好是能把 IFRAME 直接禁用了,就像禁用JAVASCRIPT一样。现在两个方法都不稳定,时好时坏!
procudure Form1.WebBrowser1OnDocumentcomplete(....)
begin
if WebBrowser1.busy then exit;
if WebBrowser1.Stats <> Complete then exit;
//~~~~~~~~~~~~~第二句话具体怎么写忘了。
end;请问各位兄弟 还有没什么其它方法,
最好是能把 IFRAME 直接禁用了,就像禁用JAVASCRIPT一样。现在两个方法都不稳定,时好时坏!
const pDisp: IDispatch; var URL: OleVariant);
var
CurWebrowser: IWebBrowser;
TopWebBrowser: IWebBrowser;
Document: OleVariant;
WindowName: string;
begin
CurWebrowser := pDisp as IWebBrowser;
TopWebBrowser := (Sender as TWebBrowser).DefaultInterface;
if CurWebrowser = TopWebBrowser then
ShowMessage('Complete document was loaded')
else
begin
Document := CurWebrowser.Document;
WindowName := Document.ParentWindow.Name;
ShowMessage(Format('Frame "%s" was loaded', [WindowName]));
end;
end;