Web浏览器未触发Navigated和DocumentCompleted事件

时间:2016-07-21 14:35:01

标签: c# winforms web-controls

我正在尝试将Url地址加载到WebControl以在WinForns项目中显示在我的表单上。这是一个代码:

WebBrowser webControl = new WebBrowser();
webControl.AllowNavigation = true;
webControl.Visible = true;
webControl.ScrollBarsEnabled = false;
webControl.ScriptErrorsSuppressed = true;

webControl.DocumentCompleted += (sender, args) =>
{
    ......
};

webControl.Navigated += (sender, args) =>
{
    ......
};

webControl.Navigating += (sender, args) =>
{
    .....
};

webControl.Navigate(url);

事件导航被触发,但Navigated和DocumentCompleted没有。 应用程序应显示带翻译文本的谷歌翻译页面。我正在尝试这个网址:

1) https://translate.google.com/#en/fr/Try+to+translate 

出了什么问题 感谢您的建议

0 个答案:

没有答案
相关问题