A simpler (although more inefficient) way to do that is to change the registry entry for the IE proxy as the webbrowser control uses the same settings as IE. It should be easy to find the code for this on google, but if you're having troubles I can dig up some old code for you.