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?
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.
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.
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.
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.
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.
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.
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