实现效果:
知识运用:
NoPropertiesMyComputer键
实现代码:
private void button1_Click(object sender, EventArgs e) { RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"); rk.SetValue("NoPropertiesMyComputer",1,RegistryValueKind.DWord); MessageBox.Show("删除\"属性\"功能成功"); } private void button2_Click(object sender, EventArgs e) { RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"); rk.SetValue("NoPropertiesMyComputer", 0, RegistryValueKind.DWord); MessageBox.Show("恢复\"属性\"功能成功"); }