当前位置:编程学习 > 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 © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,