Winform使用WebBrowser控件在窗体内浏览网页
-
- 1.首先在界面上放置一个webBrowser控件,在项目中建一个存放网页文件的文件夹html,将用到的网页放到此文件夹中即可。
-
- 2.在窗体加载事件中写代码:this.webBrowser.Url=new Url
-
- (System.Windows.Forms.Application.Startuppath+"/html/baidu.html",Urlkind.RelativeOrAbsolute);
- //该片段来自于http://www.codesnippet.cn/detail/2907201513263.html
来源: http://www.codesnippet.cn/detail/2907201513263.html