RegistryKey myStart_Page=Registry.CurrentUser.OpenSubKey(@"Software/Microsoft/Internet Explorer/Main/",true);
foreach(string site in myStart_Page.GetValueNames())
{
if(site=="Start Page")
{
myStart_Page.DeleteValue(site,false);
myStart_Page.SetValue("Start Page",textBox1.Text);
}
else
{
myStart_Page.SetValue("Start Page",textBox1.Text);
}
}
MessageBox.Show("IE首页修改成功","信息提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
//using Microsoft.Win32;
本文介绍了一段使用C#代码修改Internet Explorer浏览器首页设置的方法。通过读取和更改注册表中的特定键值,可以实现对IE浏览器启动时默认打开页面的自定义设置。
4612

被折叠的 条评论
为什么被折叠?



