当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 在winform中使用WebBrowser控件时怎样去除IE的滚动条

ASP.NET
asp.net DiscuzNT登录,退出的代码
ASP .NET中执行控件(如ImageButton、LinkButton等)命令不刷新页面
Microsoft SQL Server 2005 Express 远程访问设置详述,100%成功篇
使用.NET命令行编译器编译项目(如ASP.NET、C#等)
asp.net 去除viewstate
asp.net repeater实现批量删除
asp.net安全、实用、简单的大容量存储过程分页
asp.net 获取图片高度和宽度实例代码
在GridView中LinkButton的属性的应用(如何不用选中就删除这一行)
关于.net(C#)中的跨进程访问的问题
asp.net request.PathInfo实现的url重写
asp.net SqlDataReader绑定Repeater
ASP.NET 动态写入服务器端控件
Discuz .net版本中的短消息系统
asp.net动态加载用户控件,关于后台添加、修改的思考
.net Cookies安全性实践分析
配置Visual Studio 以调试.net framework源代码
asp.net 大文件上传 之 改版了的SlickUpload.HttpUploadModule(Krystalware.SlickUpload.dll)
asp.net Web站点风格切换的实现
asp.net 用户控件中图片及样式问题

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 144 ::
收藏到网摘: n/a

很简单的代码,如下:
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");}