实现效果:
知识运用:
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); }