Delphi:如何检查webbrowser是否已成功加载页面? [英] Delphi: How to check if webbrowser has successfully loaded the page?

查看:308
本文介绍了Delphi:如何检查webbrowser是否已成功加载页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的代码:

WebBrowser1.Navigate('www.foo.com');

但当然有时浏览失败,浏览器会显示错误消息。

如何发生这种情况?

我想要这样做,以便我可以做一些自定义日志。

But of course sometimes the browsing fails and the browser displays the error message.
How can I catch when this happens?
I want this so that I can make a some sort of a custom log.

推荐答案

我假设当有问题时调用OnNavigateError事件处理程序。

I assume that the the OnNavigateError event handler is called when there is a problem.

这篇关于Delphi:如何检查webbrowser是否已成功加载页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆