Proxy für WebBrowser setzen

/// <summary->
/// set and enable proxy and port for IE
/// </summary->
public void SetProxy(string proxy, int port)
{
    RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings&quot;, true);

    // if proxy is not set, disable proxy
    if (string.IsNullOrEmpty(proxy))
    {
        RegKey.SetValue(&quot;ProxyServer&quot;, &quot;&quot;);
        RegKey.SetValue(&quot;ProxyEnable&quot;, 0);
    }
    else
    {
        // otherwise set proxy
        RegKey.SetValue(&quot;ProxyServer&quot;, proxy + &quot;:&quot; + port.ToString());
        RegKey.SetValue(&quot;ProxyEnable&quot;, 1);
    }
}

Weiterführende Links:

Flash and Proxy Support on .NET WebBrowser Controls
MS AIOCF: WebBrowser with proxy