winform嵌套浏览器

引用winform嵌套浏览器

 

 新建UserControl

//IE 浏览器
// reportUrl = "http://10.10.16.34:9003/report/index?userid=JHICU&deptcode=KS030#";
                    reportUrl += "?userid=" + ConfigService._User()["USER_ID"].ToString() + "&deptcode=" + dc;
                    WriteTxt("【JHICU.ReportBrowser.UCReportBrowserForm】" + reportUrl);
                    WebBrowser webkitb = new WebBrowser();
                    webkitb.Navigate(reportUrl);
                    webkitb.Dock = DockStyle.Fill;
                    this.Controls.Clear();
                    this.Controls.Add(webkitb);

//谷歌 浏览器
  reportUrl += "?userid=" + ConfigService._User()["USER_ID"].ToString() + "&deptcode=" + dc;
                WriteTxt("【JHICU.ReportBrowser.UCReportBrowser】" + reportUrl);
                this.Controls.Clear();
                if (!Cef.IsInitialized)
                {
                    CefSettings settings = new CefSettings();
                    Cef.Initialize(settings);
                }
                ChromiumWebBrowser chromeBrowser = new ChromiumWebBrowser(reportUrl);
                this.Controls.Add(chromeBrowser);
                chromeBrowser.Dock = DockStyle.Fill;


//谷歌 浏览器

 // reportUrl = "http://10.10.16.34:9003/report/index?userid=JHICU&deptcode=KS030#";
                reportUrl += "?userid=" + ConfigService._User()["USER_ID"].ToString() + "&deptcode=" + dc;
                WriteTxt("【JHICU.ReportBrowser.UCReportBrowserNotCef】" + reportUrl);
                this.Controls.Clear();
                WebKitBrowser webkitb = new WebKitBrowser();
                webkitb.Navigate(reportUrl);
                webkitb.Dock = DockStyle.Fill;
                this.Controls.Add(webkitb);

 

上一篇:用Microsoft Chart Controls(MSChart)实现曲线图,并支持拖动放大到秒


下一篇:video视频标签自定义显示隐藏播放控件&Shadow DOM