使用C#在IE中打开一个页面 [英] open a page in IE using c#

查看:156
本文介绍了使用C#在IE中打开一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE中使用C#

代码打开一个网页:

的Process.Start(IEXPLORE.EXE,www.northwindtraders.com);

不过, ,我怎么能调整页面具有以下特色为:工具栏=没有,位置=没有,地位=没有,菜单=没有,滚动条=是,可调整大小=是的,宽度='622',高度= '582'

But, how can I resize the page with the following characteritics: toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width='622', height='582'

推荐答案

有关细粒度控制的那个水平,我不认为可以从命令行;添加引用(COM)来的 Microsoft Internet控制的,那么你就可以;

For that level of fine grained control which I do not believe are available from the command line; add a reference (COM) to Microsoft Internet Controls then you can;

var IE = new SHDocVw.InternetExplorer();
object URL = "http://www.northwindtraders.com";

IE.ToolBar = 0;
IE.StatusBar = false;
IE.MenuBar = false;
IE.Width = 622;
IE.Height = 582;
IE.Visible = true;

IE.Navigate2(ref URL);

这篇关于使用C#在IE中打开一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆