看见桌面乱七八糟,像我这种有强迫症的,就可以用这个软件隐藏桌面——图标显隐工具,它可以让桌面清爽一整天!有需要的欢迎下载!
图标显隐工具使用方法
通过写注册表(HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ExplorerNoDesktop键值)来达到显示(隐藏)桌面图标的小工具。
打开软件后直接单击“隐藏桌面图标”。
隐藏成功后,需要重启资源管理器。
隐藏后的桌面如下图,干净清爽~
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Diagnostics; using System.Windows.Forms; using Microsoft.Win32; namespace HideDesktopIco { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { RegistryKey key = Registry.CurrentUser; RegistryKey hide = key.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); hide.SetValue("NoDesktop", "1", RegistryValueKind.DWord);//写注册表为隐藏图标 key.Close(); MessageBox.Show("已隐藏桌面图标!按确定重启资源管理器!"); Process[] MyProcess = Process.GetProcessesByName("explorer"); MyProcess[0].Kill(); } catch (Exception ex) { MessageBox.Show("错误!!n"+ex); } } private void button2_Click(object sender, EventArgs e) { try { RegistryKey key = Registry.CurrentUser; RegistryKey see = key.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", true); see.SetValue("NoDesktop", "0", RegistryValueKind.DWord);//写注册表为显示图标 key.Close(); MessageBox.Show("已显示桌面图标!按确定重启资源管理器!"); Process[] MyProcess = Process.GetProcessesByName("explorer"); MyProcess[0].Kill(); } catch (Exception ex) { MessageBox.Show("错误!!n" + ex); } } private void button3_Click(object sender, EventArgs e) { //重启资源管理器 Process[] MyProcess = Process.GetProcessesByName("explorer"); MyProcess[0].Kill(); } private void button1_Click_1(object sender, EventArgs e) { //打开吾爱 Process.Start("iexplore.exe", " [url=http://www.52pojie.cn/]http://www.52pojie.cn/[/url] "); } } }