2009-08-11 137 views

回答

5
RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true);    

//disable proxy   
registry.SetValue("ProxyServer", 1); 

//remove tik 

    registry.SetValue("ProxyEnable", 0); 

//Proxy Status 

    int proxyStatus = (int)registry.GetValue("ProxyEnable"); 
    if (proxyStatus == 0) 
     lblProxyStatus.Text = "disable "; 
    if (proxyStatus == 1) 
     lblProxyStatus.Text = " enable"; 
相關問題