How can I hide the icons on my desktop? I've used the code below, but the problem is that it totally disables the desktop (no rightclick-menu, etc).
Thanks in advance :)
Code:
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
void ShowDesktopIcons(bool show)
{
IntPtr hWnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
if (show)
ShowWindow(hWnd, 5);
else
ShowWindow(hWnd, 0);
}
Comment