我想在Windows窗体中加载Web浏览器 [英] I want to load web browsers inside windows form

查看:94
本文介绍了我想在Windows窗体中加载Web浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个名为IE,Chrome和Firefox的按钮。单击这些按钮,我需要打开相关的浏览器,并且应该在窗体内打开。

解决方案

您无法将应用程序嵌入到表单中。对于浏览器,我假设您要使用的是将html转换为可见文档的渲染引擎。 IE将其渲染引擎公开为一个ActiveX控件,您可以轻松地将其嵌入到表单中,因为Microsoft非常喜欢这样。对于Chrome或Firefox,您必须找到一种嵌入各自引擎的方法,即Blink和Gecko,但这些引擎会随着时间和版本的变化而变化。所以谷歌如何嵌入Blink以及如何嵌入Gecko,但这可能不太容易。


尝试使用System.Windows.Forms.WebBrowser-Control for IE。

I have three buttons in form named IE, Chrome & Firefox. On click of these button, i need to open concerned browsers and that should be opened inside form.

解决方案

You can't embed applications into your form. For browsers I assume what you want to use is the rendering engine that turns html into a visible document. IE exposes its rendering engine as an ActiveX control that you can easily embed into your form because Microsoft are nice like that. For Chrome or Firefox you'd have to find a way of embedding their respective engines which are Blink and Gecko, however these change over time and versions. So google for how to embed Blink and how to embed Gecko, however it might not be easily possible.


Try using the System.Windows.Forms.WebBrowser-Control for IE.


这篇关于我想在Windows窗体中加载Web浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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