вот код на C#, скрывает значки
Код:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Text;
using System.ComponentModel;
namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
DesktopIcons.Hide();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
public static class DesktopIcons
{
#region Declarations
delegate bool EnumCallback(IntPtr hwnd, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool EnumWindows(EnumCallback lpEnumFunc, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern IntPtr GetWindow(IntPtr hWnd, GWConstants iCmd);
enum GWConstants : int
{
GW_HWNDFIRST,
GW_HWNDLAST,
GW_HWNDNEXT,
GW_HWNDPREV,
GW_OWNER,
GW_CHILD,
GW_MAX
}
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int GetClassName(IntPtr hWnd, [Out] StringBuilder buf, int nMaxCount);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool ShowWindow(IntPtr hWnd, int nShow);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool IsWindowVisible(IntPtr hWnd);
#endregion
static IntPtr hDesktop = IntPtr.Zero;
#region Methods
static string GetClassNameFromHWND(IntPtr hWnd)
{
StringBuilder sb = new StringBuilder(256);
int len = GetClassName(hWnd, sb, sb.Capacity);
if (len > 0)
return sb.ToString(0, len);
throw new Win32Exception(Marshal.GetLastWin32Error());
}
public static void Show()
{
if (hDesktop != IntPtr.Zero && !IsWindowVisible(hDesktop))
ShowWindow(hDesktop, 5);
else
EnumWindows(new EnumCallback(EnumWins), (IntPtr)5);
}
public static void Hide()
{
if (hDesktop != IntPtr.Zero && IsWindowVisible(hDesktop))
ShowWindow(hDesktop, 0);
else
EnumWindows(new EnumCallback(EnumWins), IntPtr.Zero);
}
static bool EnumWins(IntPtr hWnd, IntPtr lParam)
{
if (hWnd != IntPtr.Zero)
{
IntPtr hDesk = GetWindow(hWnd, GWConstants.GW_CHILD);
if (hDesk != IntPtr.Zero && GetClassNameFromHWND(hDesk) == "SHELLDLL_DefView")
{
hDesk = GetWindow(hDesk, GWConstants.GW_CHILD);
if (hDesk != IntPtr.Zero && GetClassNameFromHWND(hDesk) == "SysListView32")
{
ShowWindow(hDesk, lParam.ToInt32());
hDesktop = hDesk;
return false;
}
}
}
return true;
}
#endregion
}
}
а чтобы скрыть гаджеты надо убить процесс sidebar.exe, после его запуска гаджеты снова появятся на своих местах