简体   繁体   English

WinForms中的Web浏览器

[英]Web browser in WinForms

I need to view a web page inside my application (developed using C# with Visual Studio 2010 and .NET 4.0), so I need to create a simple like browser. 我需要查看应用程序内部的网页(使用C#和Visual Studio 2010和.NET 4.0开发),因此需要创建一个简单的类似浏览器。 This browser can pass a value to system. 该浏览器可以将值传递给系统。 I have tried CefSharp and webkit with no luck - I cannot load the assembly into Visual Studio. 我曾尝试CefSharpWebKit的 ,没有运气-我无法将程序集加载到Visual Studio。

How can I solve this problem? 我怎么解决这个问题?

Thanks. 谢谢。

If this is WinForms, you should consider using the WebBrowser Class which embeds Internet Explorer as a user control. 如果这是WinForms,则应考虑使用将Internet Explorer嵌入为用户控件的WebBrowser类

WPF also has a similar webbrowser control defined like this: WPF还具有类似的Web浏览器控件,定义如下:

<WebBrowser x:Name="wbMain" Margin="30">
</WebBrowser>

Many scenarios are already covered in the .Net framework, and it's easier to use what comes with the framework before trying other things. .Net框架已经涵盖了许多场景,在尝试其他事情之前,先使用该框架附带的功能是容易的。 That said, there are scenarios where you might want to use something other than the IE webbrowser control, but try the easy way first. 就是说,在某些情况下,您可能想使用IE Webbrowser控件以外的其他方法,但是请首先尝试简单的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM