For a while now I've used the following Win32 code to Hide the desktop (hide all the desktop Icons). The following is in my Win32_Window class, as the Desktop is just a window.
public bool Visible
{
get { return IsWindowVisible(Handle); }
set
{
ShowWindow(Handle, value ? ShowWindowConsts.SW_SHOW :
ShowWindowConsts.SW_HIDE);
}
}
With Windows 8 the above not only hides the desktop but it makes it go completely blank. Now I suppose that could be considered normal, as the command is to hide, but up until now that hasn't been a problem as the desktop's background image would still be visible (which was the intention).
I've tried this to toggle the icons: https://stackoverflow.com/a/6403014/353147 but it doesn't work in Windows 8.
Anyone found a solution to this?
To show or hide desktop iconsRight-click (or press and hold) the desktop, point to View, and then select Show desktop icons to add or clear the check mark. Note: Hiding all the icons on your desktop doesn't delete them, it just hides them until you choose to show them again.
Press the Windows key + D on your keyboard to display the Windows desktop. Right-click the desktop shortcut icon you'd like to hide.
You can do this in RegEdit HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced change HideIcons to 1
static void HideIcons()
{
RegistryKey myKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", true);
if (myKey != null)
{
myKey.SetValue("HideIcons", 1);
myKey.Close();
}
}
Use the Registry class as described here.
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With