Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Taskbar in Windows 8

Tags:

c#

Up to now, I was able to use the following C# code to hide the Windows taskbar:

[DllImport("user32.dll")]
private static extern int FindWindow(string className, string windowText);
[DllImport("user32.dll")]
private static extern int ShowWindow(int hwnd, int command);

private const int SW_HIDE = 0;
private const int SW_SHOW = 1;

...

int hwnd = FindWindow("Shell_TrayWnd", "");
ShowWindow(hwnd, SW_SHOW);

But when using Windows 8, this code only hides the taskbar on the primary monitor, not on the second, where the taskbar is also visible.

How may I hide the taskbar only on the screen where my windows are being shown?

like image 464
lenniep Avatar asked Aug 15 '13 16:08

lenniep


People also ask

How do I hide the Windows taskbar?

You can hide the taskbar both in desktop mode and tablet mode. Press and hold or right-click any empty space on the taskbar, select Taskbar settings, select Taskbar behaviors, and select Automatically hide the taskbar.

How do I hide the taskbar when not in use?

Hiding the Windows taskbar when you're not using it can give you more space on your screen and show off your desktop backgrounds. You can hide the taskbar from the Settings menu in Windows 10, or from the taskbar Properties window in older versions.

How do I Turn Off the taskbar in Windows 7?

Windows 8, 7, and Vista Right-click the taskbar and select "Properties.". If you're using Windows 8, select "Desktop" from the Start menu or press ⊞ Win+D first to open the desktop view. Check the "Auto-hide the taskbar" box. You'll find this in the "Taskbar" tab. Click "Apply.". You'll see the taskbar disappear.

How do I fix a taskbar that won't go away?

Sometimes toggling the auto-hide feature off and the on again will fix a taskbar that won't go away. Open the Settings (Windows 10) or Properties window again and turn the auto-hide feature off. Click "Apply" in Windows 8 and earlier versions. Once you've turned it off, toggle it back on again and apply the settings.

How to change taskbar behavior in Windows 11?

In the right pane, click Taskbar. Right-click your Windows 11 taskbar and select Taskbar settings. Right-click any empty space on the desktop and select Personalize. In the pop-up window, click Taskbar. Step 2: In Taskbar Settings, select Taskbar behaviors to show more options.


1 Answers

Don't hide the taskbar; that's the wrong way to do something like this. Instead, just make a fullscreen window, and the taskbar is smart enough to get out of your way.

You can read a good explanation & commentary by Microsoft's Raymond Chen on his blog.

like image 132
David Yaw Avatar answered Sep 24 '22 21:09

David Yaw