C
caoli
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下代码,但是执行总是出错。
ActiveFormControl.ClientSite.GetContainer(spIE);
这一行出错的,请各位指导!
uses MSHTML;
procedure TForm1.Button1Click(Sender: TObject);
var spIE:IOleContainer;
spDoc:IHTMLDocument2;
spWnd:IHTMLWindow2;
begin
spIE:=nil;spDoc:=nil;spWnd:=nil;spHis:=nil;
ActiveFormControl.ClientSite.GetContainer(spIE);
if not Assigned(spIE) then Exit;
spIE.QueryInterface(IID_IHTMLDocument2,spDoc);
if not Assigned(spDoc) then Exit;
spWnd:=spDoc.parentWindow;
if not Assigned(spWnd) then Exit;
spWnd.navigate('Test.html');
end;
ActiveFormControl.ClientSite.GetContainer(spIE);
这一行出错的,请各位指导!
uses MSHTML;
procedure TForm1.Button1Click(Sender: TObject);
var spIE:IOleContainer;
spDoc:IHTMLDocument2;
spWnd:IHTMLWindow2;
begin
spIE:=nil;spDoc:=nil;spWnd:=nil;spHis:=nil;
ActiveFormControl.ClientSite.GetContainer(spIE);
if not Assigned(spIE) then Exit;
spIE.QueryInterface(IID_IHTMLDocument2,spDoc);
if not Assigned(spDoc) then Exit;
spWnd:=spDoc.parentWindow;
if not Assigned(spWnd) then Exit;
spWnd.navigate('Test.html');
end;