zoukankan      html  css  js  c++  java
  • C# 修改IE 源代码参照样例

    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(@"SOFTWAREMicrosoftInternet ExplorerMAIN");
                //当键值名为“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(@"SoftWarePoliciesMicrosoftInternet ExplorerControl 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(@"SoftWarePoliciesMicrosoftInternet ExplorerControl 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();
            }
            
        }
    }
  • 相关阅读:
    Jquery 图片走马灯效果原理
    jquery实现跑马灯效果(一)
    jQuery实现网页放大镜功能
    JavaScript仿淘宝实现放大镜效果的实例
    jquery实现放大镜简单方法
    jQuery实现放大镜效果
    小白jquery横向菜单弹出菜单制作
    转载 Log4j2在WEB项目中配置
    Struts2关于命名空间的例子
    转载关于struts命名空间的一则报警
  • 原文地址:https://www.cnblogs.com/wordgao/p/4465177.html
Copyright © 2011-2022 走看看