当前位置:编程学习 > Delphi >>

直接在WebBrowser中显示字符串

//江雪 2001.06  http://asnowcn.at.china.com
//直接在WebBrowser中显示字符串
procedure ShowInWebBrowser(WebB:TWebBrowser;Str:String);
var
 v: Variant;
 HTMLDocument: IHTMLDocument2;
begin
 HTMLDocument := WebB.Document as IHTMLDocument2;
 if (assigned(HtmlDocument)) then  begin
   v := VarArrayCreate([0, 0], varVariant);
   v[0] := str; //that is to be shown
   HTMLDocument.Write(PSafeArray(TVarData(v).VArray));
   HTMLDocument.Close;
 end;
end;

补充:软件开发 , Delphi ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,