C# 修改IE 源代码参照样例
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LockIE
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
RegistryKey reg = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\MAIN");
//当键值名为“HomePage”的键值修改为“1”,则禁止修改IE主页
reg.SetValue("Start Page", 1, RegistryValueKind.String);
//提示对话框
MessageBox.Show(this, "禁止修改IE主页设置成功!", "提示对话框", MessageBoxButtons.OK, MessageBoxIcon.Information); StrURL.Text.Trim();
} private void button2_Click(object sender, EventArgs e)
{
//自定义RegistryKey对象实例
RegistryKey reg = Registry.CurrentUser.CreateSubKey(@"SoftWare\Policies\Microsoft\Internet Explorer\Control Panel");
//当键值名为“HomePage”的键值修改为“1”,则禁止修改IE主页
reg.SetValue("HomePage", 1, RegistryValueKind.DWord);
//提示对话框
MessageBox.Show(this, "禁止修改IE主页设置成功!", "提示对话框", MessageBoxButtons.OK, MessageBoxIcon.Information);
} private void button3_Click(object sender, EventArgs e)
{
RegistryKey reg = Registry.CurrentUser.CreateSubKey(@"SoftWare\Policies\Microsoft\Internet Explorer\Control Panel");
//当键值名为“HomePage”的键值修改为“0”,则启动IE浏览器主页的修改
reg.SetValue("HomePage", 0, RegistryValueKind.DWord);
//提示对话框
MessageBox.Show(this, "已启动IE浏览器主页的修改!", "提示对话框", MessageBoxButtons.OK, MessageBoxIcon.Information);
} private void button4_Click(object sender, EventArgs e)
{
Close();
} }
}
C# 修改IE 源代码参照样例的更多相关文章
- Libcurl的编译_HTTP/HTTPSclient源代码演示样例
HTTP/HTTPSclient源代码演示样例 环境: zlib-1.2.8 openssl-1.0.1g curl-7.36 Author: Kagula LastUpdateDate: 2 ...
- Python字符串的修改以及传参
前两天去面试web developer,面试官提出一个问题,用JavaScript或者Python实现字符串反转,我选择了Python,然后写出了代码(错误的): #!/usr/bin/env pyt ...
- 修改urllib2源代码,定制User-Agent,一劳永逸
我经常用到urllib2这个库,基本上每次都要添加 User-Agent 为一个模拟浏览器的值. 突然想到,能不能直接修改源代码,添加 User-Agent 的值. google 到 https:// ...
- Gogland配置- 修改Go源代码tab值
Gogland对Go源代码默认值为8个,我很不习惯,第一次遇到tab数量这么大的,于是我决定修改这个tab值! 1,点击顶部菜单“File”->"Settings". 2,在 ...
- redis修改的源代码zincrby,hincrby命令
在项目中大量使用zincrby命令.究其原因是统计一些统计指标的日志值,和需要返回到顺序topn. 通常情况下,.调用一次的指示器zincrby(zincrby default:type 1 type ...
- Linux 修改本地时间 (centos为例)
1. tzselect [root@xxxx etc]# tzselect --- 选择时区命令 Please identify a location so that time zone rules ...
- BOOST 解析,修改,生成xml样例
解析XML 解析iworld XML,拿到entity和VisibleVolume的数据 int ParseiWorlds::readXML(const bpath &dir) { ptree ...
- 修改zepto源代码,使支持wp8的ie10
注意:当前1.1.3版本的zepto,已经有模块来支持wp8 原先的zepto,通过__proto__赋值,来使dom继承到$.fn方法, 无奈IE11之前的IE10,IE9不支持这种写法, 所以我们 ...
- 使用Dubbo的SPI扩展机制实现自定义LoadBalance——方法一 修改Dubbo源代码
一. 拉取源码 到Dubbo官网 https://github.com/apache/incubator-dubbo/tree/2.5.x 下载源码,解压. 二. 导入IDEA 选择解压后的源码目录, ...
随机推荐
- js定时器、高亮修改单元格背景色
window.setInterval() 功能:按照指定的周期(以毫秒计)来调用函数或计算表达式. 语法:setInterval(code,millisec) 解释:code:在定时时间到时要执行的J ...
- 转载 radio值获取
选择控件:select ,radio,checkbox之用jquery获取选中值的小结 博客分类: jQuery select下拉框radio单选按钮checkbox多选框jquery获取选中的值 ...
- Custom Date tag
Custom Date tag: custom date based on pattern format. Default date is current day. <CUSTOMDATE[+, ...
- django中添加用户
在django中添加用户,直接在auth_user表中添加会有问题,因为这里密码是加密的,可以通过manage.py shell加入 创建User: 1 >>> from djang ...
- MySQL:MySQL和SQL Server的区别
导读:接下来的网上商城的项目,需要用到MySQL数据库了.这个对于我来说,是一个新接触的东西,按照惯例,在刚开始学习一个东西的时候,先从宏观上去了解它.本篇博客,先介绍SQL Server的基本内容, ...
- C/C++中几种操作位的方法
参考How do you set, clear and toggle a single bit in C? c/c++中对二进制位的操作包括设置某位为1.清除某位(置为0).开关某位(toggling ...
- jQuery遍历 slice()方法
今天做页面,遇到一个滚动的swipe,需要4个<li> 一组,然后在外层加个<ul>,方法如下: $('.xxxxx li').each(function(n){ $('.xx ...
- C# 打印异常
1. [代码]函数:将异常打印到LOG文件 跳至 [1] [2] [4] [全屏预览] ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
- jQuery 遍历 - map() 方法
定义和用法 map() 把每个元素通过函数传递到当前匹配集合中,生成包含返回值的新的 jQuery 对象. 例子1: 构建表单中所有值的列表: <p><b>value为: &l ...
- U盘加载硬盘控制卡驱动安装Windows 2003 指南
http://www.dell.com/Support/Article/cn/zh/cnbsd1/SLN263067