当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 在winform中使用WebBrowser控件时怎样去除IE的滚动条
ASP.NET 中的 在winform中使用WebBrowser控件时怎样去除IE的滚动条
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");
}
评论 (0) All