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;
using Microsoft.Win32;
using System.IO;
using System.Runtime.InteropServices;
using System.Diagnostics;
try
{
int i = 1;
RegistryKey key = Registry.CurrentUser;
RegistryKey hide = key.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", true);
hide.SetValue("HideIcons",i, RegistryValueKind.DWord);
key.Close();
Process[] MyProcess = Process.GetProcessesByName("explorer");
MyProcess[0].Kill();
}
catch (Exception ex)
{
MessageBox.Show("错误!!\n" + ex);
}
把 i=1 改成 i=0 就不能修改 ,求救, 不提示错误,就是没反应
要实现桌面图标的隐藏和显示。谢谢咯