procedure TForm1.WebBrowser1DownloadComplete(Sender: TObject);
var D : IHTMLDocument2;
begin
D := (WebBrowser1.Document as IHTMLDocument2);
d.designMode := 'On';
end;WebBrowser1中能正常显示网页,但是执行到d.designMode := 'On'时便出错,
运行时错误
=> d.designMode := 'On';
Access violation at address 00459F20 in module 'Project1.exe'. Read of address 00000000.
请问是什么原因?谢谢。
var D : IHTMLDocument2;
begin
D := (WebBrowser1.Document as IHTMLDocument2);
d.designMode := 'On';
end;WebBrowser1中能正常显示网页,但是执行到d.designMode := 'On'时便出错,
运行时错误
=> d.designMode := 'On';
Access violation at address 00459F20 in module 'Project1.exe'. Read of address 00000000.
请问是什么原因?谢谢。
解决方案 »
- 多个同样性质的事件,怎样做到代码重用?
- TcxGrid 如何安装
- FASTREPORT中TFRREPORT控件,对话框中加入TfrBDEQuery控件,运行时出来密码对话框,怎么去掉
- 请问TValueListEditor::RestoreCurrentRow()如何使用?
- 在activexform中ado数据库怎样设置,才能让客户端自动连接到WEB服务器?
- 问一个很菜的问题,那位大侠帮我?
- 紧急呼叫
- 关于多线程的问题!
- 请问如何判断内存流是什么类型的文件.
- 哪里有不规则按钮的控件下载? 如(圆形,椭圆形,菱形。。。)
- delphi7过期了?!
- 300分求解决listview大量数据添加慢的方法
(WebBrowser1.Document as IHtmlDocument2).designMode:='on';
没问题
你的WebBrowser1先Navigate了没有啊
const pDisp: IDispatch; var URL: OleVariant);
var
CurrentWB: IWebBrowser;
begin
CurrentWB := pDisp as IWebBrowser;
(CurrentWB.Document as IHTMLDocument2).DesignMode := 'On';
end;(注:在「OnDocumentComplete」event上試試)
WebBrowser1.OleObject.document.designMode := 'on'