实现效果:
知识运用:
NoThemesTab键
实现代码:
private void button1_Click(object sender, EventArgs e) { RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"); rk.SetValue("NoThemesTab",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("NoThemesTab", 0, RegistryValueKind.DWord); MessageBox.Show("开启成功"); }