VB设置IE代理服务器_君子当自强不息_百度空间
'VB设置IE代理服务器
Private Declare Function internetsetoption Lib "wininet.dll" Alias "InternetSetOptionA" _
(ByVal hinternet
As Long, ByVal dwoption As Long, ByRef lpbuffer As Any, ByVal dwbufferlength As Long) As Long


'proxyaddress=192.168.1.1:80格式
'
isEnable为TRUE时设置代理服务器,为FALSE时取消
Public Function ChangProxy(ProxyAddress As String, isEnable As Boolean)
If isEnable Then
    ModRW_Reg.SetStringValue
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", ProxyAddress

    ModRW_Reg.SetDWORDValue
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 1
Else
    ModRW_Reg.DelValue
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer"
    ModRW_Reg.SetDWORDValue
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", 0
End If
   
'写入注册表后调用,即可不重启IE实现代理地址的更换
    Call internetsetoption(0, 39, 0, 0)
End Function


郑重声明:资讯 【VB设置IE代理服务器_君子当自强不息_百度空间】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——