实现效果:
知识运用:
Policies\System子键的NoDispAppearancePage键值
实现代码:
private void button1_Click(object sender, EventArgs e) { RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); rk.SetValue("NoDispAppearancePage",1,RegistryValueKind.DWord); MessageBox.Show("设置成功!"); } private void button2_Click(object sender, EventArgs e) { RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); rk.SetValue("NoDispAppearancePage", 0, RegistryValueKind.DWord); MessageBox.Show("设置成功!"); }