直接在WebBrowser中显示字符串

    技术2022-05-11  67

    //江雪 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;


    最新回复(0)