实现效果:
知识运用:
PaintDesktopVersion键
实现代码:
private void button1_Click(object sender, EventArgs e) { RegistryKey rk; rk = Registry.CurrentUser; rk = rk.CreateSubKey("Control Panel\Desktop"); rk.SetValue("PaintDesktopVersion",0); MessageBox.Show("设置成功! 请刷新桌面"); } private void button2_Click(object sender, EventArgs e) { RegistryKey rk; rk = Registry.CurrentUser; rk = rk.CreateSubKey("Control Panel\Desktop"); rk.SetValue("PaintDesktopVersion", 1); MessageBox.Show("设置成功!请刷新桌面"); }