直接在WebBrowser中显示字符串
2006-02-04 13:27:57 来源:WEB开发网核心提示://直接在WebBrowser中显示字符串PRocedure ShowInWebBrowser(WebB:TWebBrowser;Str:String);var v: Variant; HTMLDocument: IHTMLDocument2;begin HTMLDocument := WebB.Document as
//直接在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;
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;
Tags:直接 WebBrowser 显示
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接