winform程序,我用process已打开IE,怎么设置这个IE窗口是一个新打开的窗口而不是替换了原先的! 高分
解决方案 »
- osg动画如何添加透明标签(C#)
- socket 怎么处理 cookie
- C# ref和out问题
- 求比较两静态html上表格里的数据是否一致的方法
- 哪里有C#做的一些小软件的源代码呢?帮忙了哈!
- 在datagrid中运行时新增加一行出错:“找不到第*行”。50分!!
- C#中list.Sort()自定义排序问题
- 刚开始学习,请问C#中的数值类型和引用类型到底有什么区别,说得越容易理解越好
- 怎样使用STUDIO来嵌入自己的资源文件?
- 请问创建windows服务的时候,OnStart()和OnStop()是做什么的?是不是要把想实现服务的代码放在OnStart()里边?
- 怎样应用OracleParameter怎样写like查询语句?
- C#高手来帮忙
proc.StartInfo.Arguments="";
proc.Start();
我是这样打开一个IE 我想使打开的IE是新的 应该怎么办
myProcess.StartInfo.FileName = "IExplore.exe";
myProcess.StartInfo.Arguments = "http://www.csdn.net";
myProcess.StartInfo.CreateNoWindow=true;
myProcess.Start();
Process myProcess1 = new Process();
myProcess1.StartInfo.FileName = "IEXPLORE.EXE";
myProcess1.StartInfo.Arguments = yoururl;
myProcess1.StartInfo.CreateNoWindow=true;
myProcess1.Start();
proc.StartInfo.Arguments="";
proc.Start();
myP.StartInfo.FileName = "IExplore.exe";
myP.StartInfo.Arguments = url;
myP.StartInfo.CreateNoWindow = true;
myP.Start();
InternetExplorerClass m_IE =new InternetExplorerClass();
也可以用接口:InternetExplorer m_IE =new InternetExplorer();
object o=null;
m_IE.Navigate("http://mail.163.com/",ref o,ref o,ref o,ref o);
m_IE.Visible=true;
不过这样要添加对SHDocVw的引用
如果用Process也应该能实现,以下我没测试过,你自己试试:
Process myProcess = new Process();
myProcess.StartInfo.FileName = "IExplore.exe";
myProcess.Start();
ShellWindows sws= new ShellWindowsClass();
foreach(InternetExplorer Browser in sws)
{
string fl=Browser.FullName;
fl=Path.GetFileNameWithoutExtension(fl).ToLower();
HTMLDocument doc=(HTMLDocument)Browser.Document;
if(fl.Equals("iexplore")&&doc.title="")
{
object o=null;
Browser.Navigate("http://mail.163.com/",ref o,ref o,ref o,ref o);
break;
}
}
//这样也要添加对SHDocVw的引用
http://www.fsang.com/article.asp?id=10