我想使用WebBrowser控件在单声道Windows窗体 [英] I want to use WebBrowser Control in Mono Windows Form

查看:167
本文介绍了我想使用WebBrowser控件在单声道Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很困惑,如何我可以使用webbrowser控件在我的窗体单声道应用程序(可以运行在Windows和Mac)。我发现这个主题只有链接,但它不是一个教程,所以我不能理解一件事。

I am really confused about how can i use webbrowser control in my windows form mono application(that can run on windows and Mac). I found this only link on this topic but it is not like a tutorial so i can't understand a thing.

我发现Mono.webbrowser.dll从Mono库,并添加到项目的参考在Visual Studio。 / p>

I found Mono.webbrowser.dll from Mono library and added into reference of project in visual studio.

     IWebBrowser browser= Mono.WebBrowser.Manager.GetNewInstance(Platform.Winforms);

然后我添加了这一行,它导致一些依赖性异常。

then i added this line and it is causing some dependency exception. I must be missing some basics so kindly help me.

推荐答案

首先,我会高度不鼓励

跨平台WebBrowser支持Mono仍然是实验性,并使用浏览器非常过时:Firefox(Gecko)和IE(IE 5或6)的版本。
这意味着它不支持近年来网站的任何新功能。

Cross platform WebBrowser Support in Mono is still experimental and use browsers pretty outdated: version of Firefox (Gecko) and IE (IE 5 or 6). It means that it doesn't support any of the new features of websites done in the recent years.

此外,互操作性的方式是通过COM )和.Net中的原始设计不会使其成为来自.Net团队或Mono的强大支持的良好候选人。
我的意思是今天存在,在未来几年可能会消失

Furthermore, the way interoperability is done (through COM) and the original design back in .Net do not make it a good candidate for strong support either from .Net team nor Mono one. What I mean is as it exists today, it will probably disappear in the coming years.

特别是当考虑到已经是相当不错的替代品,像那样

Especially when considering that there are already pretty good alternatives out there like

  • CefGlue which is mono compatible or
  • CefSharp and the fact that
  • Ms is pushing a brand new browser: Edge.

注意:Cef代表Chromium嵌入式框架,Cef包装器如CefGlue / Sharp支持使用具有所有受支持功能的Chrome。

Note: Cef stands for Chromium embedded framework and then Cef wrappers like CefGlue/Sharp enables the use of a Chrome with all the supported features.

链接显示为可理解,因为不适用不知道如何构建它(或其依赖关系,如gtk-sharp)。如果您真的想这样做,您必须先尝试在单一 gtk-sharp 。根据您要达成的目标,您需要:

The link you provided appears as not understoodable because it's not intended really for developpers using Mono without knowing how to build it (or its dependencies like gtk-sharp). If you really want to go this way, you must first try to learn more on Mono or dependencies like gtk-sharp. Depending on what you're trying to achieve, you either need:


  • gluezilla(Firefox / Gecko)。它应该开箱即用。但是您必须将平台更改为Unix。

  • SHDocVw.dll,mshtml.dll,BrowseUI.dll(MSIE)

这篇关于我想使用WebBrowser控件在单声道Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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