固定任务栏

实现效果:

  

知识运用:

  LockTaskBar键值

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            Registry.SetValue(@"HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer","LockTaskBar",1);
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Registry.SetValue(@"HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer", "LockTaskBar", 0);
        }

  

原文地址:https://www.cnblogs.com/feiyucha/p/10331552.html