在winform中使用WebBrowser控件时怎样去除IE的滚动条

类别:.NET开发 点击:0 评论:0 推荐:
很简单的代码,如下:

using mshtml; object x = System.Reflection.Missing.Value; axWebBrowser1.Navigate(@"你的网页地址", ref x, ref x, ref x, ref x); private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e) ...{ mshtml.IHTMLDocument2 doc = (mshtml.IHTMLDocument2)axWebBrowser1.Document; mshtml.IHTMLWindow2 win = (mshtml.IHTMLWindow2)doc.parentWindow; win.execScript("document.body.style.overflow='hidden';","javascript"); }

本文地址:http://com.8s8s.com/it/it41814.htm