Q:

How to hide the Taskbar on Windows 8 programmatically on a normal user environment?

I use the following code to hide the taskbar:
ShowWindow(FindWindow(L"Shell_TrayWnd",L""), SW_HIDE);

This works when I run the program on a user with Administrator rights. However, when I run the same code on normal user account, it doesn't work (the taskbar is not hidden). What should I do to fix this?

A:

The first question to ask is "why are you trying to hide the taskbar"?  If the answer is "because I want my application to run full-screen", then do just that: create a full-screen window.  See http://blogs.msdn.com/b/oldnewthing/archive/2005/05/05/414910.aspx for details.
If you're trying to hide the taskbar for other reasons, don't.  It's a standard part of the Windows UI, and whether it's shown or hidden (or auto-hidden) is a user-setting, not something your app should be changing.

