D
DouZheng
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmMain.ShowHtml(Browser: TWebBrowser; content: string);
var
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
vv := VarArrayCreate([0, 0], varVariant);
vv[0] := content;
HTMLDocument := browser.Document as IHTMLDocument2;
HTMLDocument.Write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.Close;
end;
当TWebBrowser显示file://页面时,比如e:,再运行上面的ShowHtml过程,
这句话:HTMLDocument := browser.Document as IHTMLDocument2;
出现错误:Interface not supported.
怎么解决?
var
vv: Variant;
HTMLDocument: IHTMLDocument2;
begin
vv := VarArrayCreate([0, 0], varVariant);
vv[0] := content;
HTMLDocument := browser.Document as IHTMLDocument2;
HTMLDocument.Write(PSafeArray(TVarData(vv).VArray));
HTMLDocument.charset := 'gb2312';
HTMLDocument.Close;
end;
当TWebBrowser显示file://页面时,比如e:,再运行上面的ShowHtml过程,
这句话:HTMLDocument := browser.Document as IHTMLDocument2;
出现错误:Interface not supported.
怎么解决?