如何用最小化的窗口打开IE? [英] How to open IE with minimized window?

查看:105
本文介绍了如何用最小化的窗口打开IE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我可以打开记事本并使用以下代码最小化窗口:



ProcessStartInfo startInfo = new ProcessStartInfo(notepad .exe);

startInfo.WindowStyle = ProcessWindowStyle.Minimized;



startInfo.Arguments =www.google.com; < br $>


Process.Start(startInfo);



但是我无法打开IE并将其最小化:

ProcessStartInfo startInfo = new ProcessStartInfo(iexplore.exe);

startInfo.WindowStyle = ProcessWindowStyle.Minimized;



startInfo.Arguments =www.google.com;



Process.Start(startInfo);



如何打开IE并最小化它?

那么我使用IE9和Win7。

Hi there,
I can open notepad and minimize the window with following code:

ProcessStartInfo startInfo = new ProcessStartInfo("notepad.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;

startInfo.Arguments = "www.google.com";

Process.Start(startInfo);

But I can''t open IE and minimize it:
ProcessStartInfo startInfo = new ProcessStartInfo("iexplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;

startInfo.Arguments = "www.google.com";

Process.Start(startInfo);

How can I open IE and Minimize it?
By the way, I use IE9 and Win7.

推荐答案





因为,iexplore.exe没有任何命令行参数来最小化启动时,你可以编写下面的vbscript来实现它。

Hi,

Since, iexplore.exe is not having any command line parameter to minimize while launch, you can write the below vbscript to achieve that.
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """c:\program files\internet explorer\iexplore.exe"" http://www.google.com""",2





最好的问候

Muthuraja



Best Regards
Muthuraja


这篇关于如何用最小化的窗口打开IE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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