管理屏幕保护设置

实现效果:
  

知识运用:

  NoDispScrSavPage键值

实现代码:

        private void radioButton2_Click(object sender, EventArgs e)
        {
            RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem");
            if (radioButton1.Checked == true)
                rk.SetValue("NoDispScrSavPage", 1, RegistryValueKind.DWord);
            else if (radioButton2.Checked == true)
                rk.SetValue("NoDispScrSavPage", 0, RegistryValueKind.DWord);}
        }

  

原文地址:https://www.cnblogs.com/feiyucha/p/10332454.html