I have used the following code to disable the control panel:
RegistryKey RegKey = Registry.CurrentUser.CreateSubKey(
@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer");
RegKey.SetValue("NoControlPanel", false, RegistryValueKind.DWord);
RegKey.Close();
The above code disables control panel only after restarting, I would like to apply the setting immediately without restarting. Please help me.