如何在我的Windows应用程序中使用Gecko Web浏览器控件? [英] How Do I Use Gecko Webbrowser Control In My Windows Application ?

查看:264
本文介绍了如何在我的Windows应用程序中使用Gecko Web浏览器控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Windows应用程序。在那我使用activex控件和其他DLL。首先,我使用.net的默认webbrowser控件。因为我想显示我的网站的实时页面。但它在我的应用程序中不起作用,因为错误发生如下 - System.Windows.Forms.dll中发生类型'System.Runtime.InteropServices.SEHException'的例外但不是用户代码处理

附加信息:外部组件抛出异常。



这项工作完全适用于其他测试应用程序但不是在我的项目申请中。



所以我在我的表格中使用webbrowser控件的替代品 - gecko web browsaer control。因为我想显示我的网站的实时页面,但它不会加载。我将Xulrunner设置如下..



  public  Form1() 
{
InitializeComponent();

Skybound.Gecko.Xpcom.Initialize( @ C:\Program Files \ xulrunner的);
}

private void Form1_Load( object sender,EventArgs e)
{
geckoWebBrowser1.Navigate( http://www.google.com);
}



  - 错误无法找到www.google.com。请检查名称,然后重试。 



它可以正常使用http:// localhost:...赞



geckoWebBrowser1 .Navigate(http:// localhost:.....);



请回复我



提前致谢..

解决方案

尝试 http:/ /code.google.com/p/geckofx/ [ ^ ]。

I am working on windows application. In that i use activex control and other dll. First i use default webbrowser control of .net. in that i want to display live page of my website .But it's not work in my application because error occur like - " An exception of type 'System.Runtime.InteropServices.SEHException' occurred in System.Windows.Forms.dll but was not handled in user code "
"Additional information: External component has thrown an exception."

This work perfectly in other Test application but not in my Project Application.

so i use alternative of webbrowser control - gecko web browsaer control - in my Form. in that i want to display live page of my website but it will not load. I set the Xulrunner as below..

public Form1()
{
   InitializeComponent();

   Skybound.Gecko.Xpcom.Initialize(@"C:\Program Files\xulrunner");
}

private void Form1_Load(object sender, EventArgs e)
{
   geckoWebBrowser1.Navigate("http://www.google.com");
}


- Error is www.google.com could not be found. please check the name and try again.


it work fine with http://localhost: ... like

geckoWebBrowser1.Navigate("http://localhost:.....");

Please reply me

Thanks in advance..

解决方案

Try http://code.google.com/p/geckofx/[^].


这篇关于如何在我的Windows应用程序中使用Gecko Web浏览器控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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