用timer,改变代理IP,然后调用axwebBrowser的代理函数呀。

解决方案 »

  1.   

    AxWebBrowser 的代理函数是哪个呀?
      

  2.   

    to -cdo(cdo)
    没找到,你用的是微软的那个 com 吗?
      

  3.   

    axwebBrowser中没有代理函数的话,可能需要进行api的调用,思路是这样,具体我也没做过:)
    帮你去找找资料看看。
      

  4.   

    [DllImport(@"wininet",
     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);
    }
      

  5.   

    to -cnhgj(戏子) (我们可不可以不勇敢)这个“激活代理设置” 怎么用的?[DllImport(@"wininet",
     SetLastError=true,
     CharSet=CharSet.Auto,
     EntryPoint="InternetSetOption",
     CallingConvention=CallingConvention.StdCall)]
    public static extern bool InternetSetOption
    (
    int hInternet,
    int dmOption,
    IntPtr lpBuffer,
    int dwBufferLength
    );上面这段代码是作什么的没看懂,能不能帮忙解释一下,谢谢。
      

  6.   

    多谢  cnhgj(戏子) (我们可不可以不勇敢) ,结贴。