Launch IE with ProcessStartInfo
This is probably the cleanest and nicest way to launch a program that i’ve found so far.
using System.Diagnostics;
void OpenIEWithStartInfo()
{
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
Process.Start(startInfo);
startInfo.Arguments = "website goes here";
Process.Start(startInfo);
}
It’s clean, clear and easy to follow and understand. If you want to leave the Arguments out, you can. However, if you’re doing that, you may aswell use something even simpler:
void
LaunchIE()
{
Process.Start("IExplore.exe");
}
The problem with the single line start up is you can’t specify things like the window starting maximised, etc. Which is why i prefer the first function better.