可插入异步协议就可以
针对不同的类型, 做对应的处理
codeproject 和 陈省 DELPHI深度历险上都有DEMO可以修改。

解决方案 »

  1.   


    能不能详细说说,或者给个DEMO看看?我对这方面目前还不是很了解
      

  2.   

    感谢你的回答,我有在网上看到Delphi开发嵌入式IE浏览器监控程序,并参考其程序写了一下,在其的DoDownloadComplete这个事件里写以下代码procedure DoDownloadComplete(IEThis:IWebBrowser2);
    var
      zlystr,lystr: WideString;
      strlen,subi,i:integer;
      newstr,tempstr,Vstr,newsubstr,oldsubstr:string;
      ExceptionFile: String;
      F_Exception: TextFile;
    Begin
      //可以在该函数中处理网页文本以及图象等信息
      zlystr:=(IEThis.Document as ihtmldOcument2).body.innerHTML;
      tempstr := zlystr;
      oldsubstr:= '关于';
      newsubstr:= 'QQ';
      Vstr:= zlystr;
      strlen := length(Vstr);
      subi:=length(oldsubstr);
      i := pos(oldsubstr,Vstr);
      newstr := '';
      while i>0 do
      begin
        newstr := newstr+copy(tempstr,1,i-1)+newsubstr;
        delete(tempstr,1,i+subi-1);
        i:=pos(oldsubstr,tempstr);
      end;
      zlystr:= newstr+tempstr;
      (IEThis.Document as ihtmldOcument2).body.innerHTML:= zlystr;
    end;可是在浏览器打开网页的时候,就直接卡死,能否帮我看下,是不是不能直接 (IEThis.Document as ihtmldOcument2).body.innerHTML:= zlystr;这样子替换,还是我的代码哪边有误呢
      

  3.   

    挂接事件即可,不用什么DLL的.