using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32; //注意不要漏掉!!
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string key = @"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main";
string valueName = "Start Page";
string value = "http://www.baidu.com";
Registry.SetValue(key, valueName, value);
}
}
}
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。