Everytime opening a new browser window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,

I am using a LinkLabel control to in a VB.NETwindows application to visit
web pages, and I am using

System.Diagnostics.Process.Start("http://www.microsoft.com")

Using this line of code I am unable to open the web pages in different web
browser, that is if, one browser window is opened with the
"www.microsoft.com" link, then the following instruction

System.Diagnostics.Process.Start("http://www.google.com")
will open google, in the same browser window, where microsoft.com was opened
previously,

Can anybody help me to open different browser window for different URL using
System.Diagnostics.Process.Start(URL) and LinkLabel?

Thanks
 
I believe there is a setting in Internet Explorer which causes it to reuse an
existing browser window. It has nothing to do with Process.Start.

HTH, Jakob.
 
Kajol said:
Can anybody help me to open different browser window for different URL
using
System.Diagnostics.Process.Start(URL) and LinkLabel?

Thanks

IE takes a string argument of "new" on the command line as a signal to open
up a new window. This C# hack below demonstrates that.

Regards,
Will

using System;
using System.Diagnostics;

namespace MySample
{
class MyTest
{
[STAThread]
static void Main(string[] args)
{
ProcessStartInfo info;

info = new ProcessStartInfo("iexplore.exe", "-new
http://www.microsoft.com");
System.Diagnostics.Process.Start(info);

info = new ProcessStartInfo("iexplore.exe", "-new
http://msdn.microsoft.com");
System.Diagnostics.Process.Start(info);
}
}
}
 
Thanks William DePalo, it worked for me.

William DePalo said:
Kajol said:
Can anybody help me to open different browser window for different URL
using
System.Diagnostics.Process.Start(URL) and LinkLabel?

Thanks

IE takes a string argument of "new" on the command line as a signal to open
up a new window. This C# hack below demonstrates that.

Regards,
Will

using System;
using System.Diagnostics;

namespace MySample
{
class MyTest
{
[STAThread]
static void Main(string[] args)
{
ProcessStartInfo info;

info = new ProcessStartInfo("iexplore.exe", "-new
http://www.microsoft.com");
System.Diagnostics.Process.Start(info);

info = new ProcessStartInfo("iexplore.exe", "-new
http://msdn.microsoft.com");
System.Diagnostics.Process.Start(info);
}
}
}
 
Nice - I did not know that.

/Jakob


William DePalo said:
Kajol said:
Can anybody help me to open different browser window for different URL
using
System.Diagnostics.Process.Start(URL) and LinkLabel?

Thanks

IE takes a string argument of "new" on the command line as a signal to open
up a new window. This C# hack below demonstrates that.

Regards,
Will

using System;
using System.Diagnostics;

namespace MySample
{
class MyTest
{
[STAThread]
static void Main(string[] args)
{
ProcessStartInfo info;

info = new ProcessStartInfo("iexplore.exe", "-new
http://www.microsoft.com");
System.Diagnostics.Process.Start(info);

info = new ProcessStartInfo("iexplore.exe", "-new
http://msdn.microsoft.com");
System.Diagnostics.Process.Start(info);
}
}
}
 
Back
Top