0
它甚至有可能吗?以编程方式更改包含密码而不重新启动的Internet Explorer代理(即在vb.net中)
我知道这样做的一种方法是更改注册表。但是,必须有更好的方法。
共享子EnableProxy1()
Dim regKey As Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", True)
regKey.SetValue("ProxyEnable", True, Microsoft.Win32.RegistryValueKind.DWord)
regKey.SetValue("ProxyServer", proxyhandler.proxyFedtoInternetExplorer, Microsoft.Win32.RegistryValueKind.String)
regKey.SetValue("ProxyOverride", "<local>", Microsoft.Win32.RegistryValueKind.String)
regKey.Close()
结束子
共享子DisableProxy() 昏暗REGKEY作为Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", True)
regKey.SetValue("ProxyEnable", False, Microsoft.Win32.RegistryValueKind.DWord)
regKey.Close()
结束子
否则这有两个弱点
- 我需要重新启动Internet Explorer
- 我需要通过直接操作窗口更改代理的用户名和密码。
我想要一个更好更直接的方法。无论如何?
系统范围的代理?为什么目前vb.net需要重启? – 2011-04-24 12:36:59
即代理。 ie必须重新启动。 – 2011-04-25 14:45:06
对不起,标题应该是编程方式更改Internet Explorer代理包括密码无需重新启动IE浏览器在vb.net – 2011-04-25 14:45:31