Embedding a Web page in a C# Window

2020-07-11 05:55发布

I want to create a simple C# Window which displays the contents of a webpage. Is this possible ?

Eg. (what I am trying to do is)

csharp.window.loadUrl("http://www.google.com")

4条回答
可以哭但决不认输i
2楼-- · 2020-07-11 06:30

I think you want to take a look at the Windows Forms WebBrowser control, or the WPF equivalent

查看更多
虎瘦雄心在
3楼-- · 2020-07-11 06:35

Just for completeness, there is also a quite usable control to embed firefox instead of MS Explorer:

GeckoFX

查看更多
Juvenile、少年°
4楼-- · 2020-07-11 06:40

You can simply do this in a WebBrowser control. And use Navigate(string url) method to browse to a website. have a look Here for Details

http://msdn.microsoft.com/en-us/library/3s8ys666.aspx

and here is the details for the WebBrowser Class

http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

查看更多
Deceive 欺骗
5楼-- · 2020-07-11 06:40

Create a form with a WebBrowser control. You can use its methods to navigate to a page or manipulate the document as you see fit.

查看更多
登录 后发表回答