title: Programmatically Set Browser Proxy Settings in C#
body: <p>I'm writing an winforms app that needs to set internet explorer's proxy settings and then open a new browser window. At the moment, I'm applying the proxy settings by going into the registry:</p>
  
  <pre><code>RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);
  registry.SetValue("ProxyEnable", 1);
  registry.SetValue("ProxyServer", "127.0.0.1:8080");
  </code></pre>
  
  <p>Is going into the registry the <em>best</em> way to do this, or is there a more recommended approach? I'd like to avoid registry changes if there's an alternative solution.</p>