用timer,改变代理IP,然后调用axwebBrowser的代理函数呀。
解决方案 »
- .net中HTML怎样转换为Text
- .net里如何实现VB中on error resume next的功能
- guid类型填充到datagridview中的奇怪问题
- 急急急,关于删除dataset中table的某一行问题,在线等
- html作为客户端,aspx作为服务端,但是服务端显示不了,咋办呢?
- comerliang(天地良心)(性欲被自己倒分倒没了,以后再也不敢倒分了)老兄,你这段代码是哪儿的,objApp = myApp;这段代码你怎么写出来的,
- 关于C#字体的设置 急等
- vs2010引用com组件出错,vs2008中引用没有问题
- 有点不懂!!!
- 高分求教,有百分相送!!!
- 请教!winform如何传数据给网页?
- 请高手帮忙解决一下双操作系统问题
没找到,你用的是微软的那个 com 吗?
帮你去找找资料看看。
SetLastError=true,
CharSet=CharSet.Auto,
EntryPoint="InternetSetOption",
CallingConvention=CallingConvention.StdCall)]
public static extern bool InternetSetOption
(
int hInternet,
int dmOption,
IntPtr lpBuffer,
int dwBufferLength
);public static void SetProxy()
{
//打开注册表
RegistryKey regKey = Registry.CurrentUser;
string SubKeyPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
RegistryKey optionKey = regKey.OpenSubKey(SubKeyPath,true);
//更改健值,设置代理,
optionKey.SetValue("ProxyEnable",1);
optionKey.SetValue("ProxyServer","192.168.1.85:80");
//激活代理设置
InternetSetOption(0,39,IntPtr.Zero,0);
InternetSetOption(0,37,IntPtr.Zero,0);
}
SetLastError=true,
CharSet=CharSet.Auto,
EntryPoint="InternetSetOption",
CallingConvention=CallingConvention.StdCall)]
public static extern bool InternetSetOption
(
int hInternet,
int dmOption,
IntPtr lpBuffer,
int dwBufferLength
);上面这段代码是作什么的没看懂,能不能帮忙解释一下,谢谢。