实现效果:

  清除IE地址栏中的历史网址_microsoft

知识运用:

  RegistryKey类的GetValueNames和DeleteValue方法

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\TypedURLs");
            string[] list = rk.GetValueNames();
            foreach (string s in list)
            {
                rk.DeleteValue(s);
            }
            MessageBox.Show("清除完成!");
        }