标签归档:TWebBrowser

TWebBrowser显示自定义Html内容


uses
ActiveX, MSHtml;

var
Document: IHtmlDocument2;
V: OleVariant;
begin
WebBrowser1.Navigate(‘about:blank’);
Document := WebBrowser1.Document as IHtmlDocument2;
V := VarArrayCreate([0, 0], varVariant);
V[0] := ‘Hello World’;
Document.Write(PSafeArray(TVarData(v).VArray));
end;