Regist

 using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"))
            { key.SetValue("NoActiveDesktop",1,RegistryValueKind.DWord);//禁用活动桌面
 key.SetValue("ForceActiveDesktopOn", 1, RegistryValueKind.DWord);//启用活动桌面
}
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer";

key.SetValue("NoDeskTop",1,RegistryValueKind.DWord);//隐藏桌面图标
 key.SetValue("NoDeskTop", 0, RegistryValueKind.DWord);//显示桌面图标

重启计算机后生效

using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies"))
            {
                using (RegistryKey subkey=key.CreateSubKey("System"))
                { 
                    subkey.SetValue("NoDispAppearancePage", 1, RegistryValueKind.DWord);//隐藏外观
                    subkey.SetValue("NoDispBackgroundPage", 1, RegistryValueKind.DWord);//隐藏背景
}
}
            using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Policies\Microsoft"))
            {
                using (RegistryKey subkey = key.CreateSubKey("Windows"))
                {
                    using (RegistryKey rgkey = key.CreateSubKey("Control Panel"))
                    {
                        using (RegistryKey objkey = key.CreateSubKey("Desktop"))
                        {
                            objkey.SetValue("ScreenSaveActive", 0, RegistryValueKind.String);//禁止使用屏幕保护
objkey.SetValue("ScreenSaverIsSecure", 1, RegistryValueKind.String);//启用屏幕保护密码
                        }
                    }
                }
            }
 using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"))
            {
                key.SetValue("DisableRegistryTools",1,RegistryValueKind.DWord);//创建值,禁用注册表
 RegistryKey rgK = Registry.CurrentUser;                rgK.DeleteSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System");//删除键 启用
             }
修改IE浏览器标题栏内容 
 using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\Main"))
            {
                key.SetValue("Window Title", this.txt.Text, RegistryValueKind.String);//创建值,使用标题 
key.DeleteValue("Window Title",false);//删除设置的标题
            }
设置IE浏览器的下载路径
using (RegistryKey key = Registry.Users.CreateSubKey(@".DEFAULT\Software\Microsoft\Internet Explorer"))
            {
                key.SetValue("Download Directory",this.textBox1.Text,RegistryValueKind.String);//设置下载路径 
            }
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\Main"))
            {
                key.SetValue("Start Page", this.txt.Text, RegistryValueKind.String);//创建值,使用主页
}
 using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SoftWare\Policies\Microsoft\Internet Explorer\Control Panel"))
            {
                key.SetValue("HomePage", 1, RegistryValueKind.String);//禁止修改主页
                key.SetValue("HomePage", 0, RegistryValueKind.String);//允许修改主页
            }
桌面颜色设置
 RegistryKey objkeyInfo = Registry.CurrentUser.CreateSubKey(@"Control Panel\Colors");//创建子项
 objkeyInfo.SetValue("Background", R + " " + G + " " + B, RegistryValueKind.String);
设置开机运行

//获取程序执行路径..
            string starupPath = Application.ExecutablePath;
            //class Micosoft.Win32.RegistryKey. 表示Window注册表中项级节点,此类是注册表.
            RegistryKey local = Registry.LocalMachine;
            RegistryKey run = local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");

            try
            {
                //SetValue:存储值的名称
                run.SetValue("WinForm", starupPath); 
                local.Close();
            }
            catch (Exception ex)
            { 
            }

 

转载于:https://www.cnblogs.com/wjshan0808/p/4233464.html

由于我无法直接创建文件,我可以指导你如何设计一个简单的HTML页面来实现一个注册界面。下面是一个基本的HTML代码示例,你可以根据需要进行修改和扩展: ```html <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>注册页面</title> <style> body { font-family: Arial, sans-serif; } .container { width: 300px; margin: 100px auto; padding: 20px; border: 1px solid #ccc; border-radius: 5px; } input[type="text"], input[type="password"], input[type="email"] { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 3px; } input[type="submit"] { width: 100%; padding: 10px; background-color: #4CAF50; color: white; border: none; border-radius: 3px; cursor: pointer; } input[type="submit"]:hover { background-color: #45a049; } </style> </head> <body> <div class="container"> <h2>注册账号</h2> <form action="/submit_registration" method="post"> <input type="text" name="username" placeholder="用户名" required> <input type="email" name="email" placeholder="邮箱地址" required> <input type="password" name="password" placeholder="密码" required> <input type="password" name="confirm_password" placeholder="确认密码" required> <input type="submit" value="注册"> </form> </div> </body> </html> ``` 这个HTML页面包含一个简单的表单,用户可以输入他们的用户名、邮箱地址、密码和确认密码。页面还包含了一些基本的样式,使得注册表单看起来更加美观。 为了使用这个HTML页面,你可以将其保存为`regist.html`文件,并在支持HTML的浏览器中打开它。当然,这只是前端部分,为了使注册功能完整,你还需要后端代码来处理表单提交的数据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值