Controlling+the+Windows+taskbar

//by Richard Russell, August 2007//

The code listed in this article allows you to control various aspects of the Windows taskbar, in particular to hide and show the **deskband**, **notification icons** and **clock**:



In the normal configuration, the **deskband** is positioned on the left, next to the Start button, and holds shortcuts to popular applications; the **clock** is at the extreme right-hand end of the taskbar, and to the left of the clock are the **notification icons**. Listed below are code segments to hide and show the taskbar itself and each of these elements:

To hide the taskbar: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "ShowWindow", htray%, 0 code To show the taskbar: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "ShowWindow", htray%, 1 code To hide the deskband: code format="bb4w" WMTRAY_TOGGLEQL = &4ED SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "SendMessage", htray%, WMTRAY_TOGGLEQL, 0, 0 : REM Hide deskband code To show the deskband: code format="bb4w" WMTRAY_TOGGLEQL = &4ED SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "SendMessage", htray%, WMTRAY_TOGGLEQL, 0, 1 : REM Show deskband code To hide the notification icons: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "FindWindowEx", htray%, 0, "TrayNotifyWnd", 0 TO hnotify% SYS "FindWindowEx", hnotify%, 0, "SysPager", 0 TO hpager% SYS "ShowWindow", hpager%, 0 : REM Hide systray icons code To show the notification icons: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "FindWindowEx", htray%, 0, "TrayNotifyWnd", 0 TO hnotify% SYS "FindWindowEx", hnotify%, 0, "SysPager", 0 TO hpager% SYS "ShowWindow", hpager%, 1 : REM Show systray icons code To hide the clock: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "FindWindowEx", htray%, 0, "TrayNotifyWnd", 0 TO hnotify% SYS "FindWindowEx", hnotify%, 0, "TrayClockWClass", 0 TO hclock% SYS "ShowWindow", hclock%, 0 : REM Hide systray clock code To show the clock: code format="bb4w" SYS "FindWindow", "Shell_TrayWnd", 0 TO htray% SYS "FindWindowEx", htray%, 0, "TrayNotifyWnd", 0 TO hnotify% SYS "FindWindowEx", hnotify%, 0, "TrayClockWClass", 0 TO hclock% SYS "ShowWindow", hclock%, 1 : REM Show systray clock code Note that this code isn't guaranteed to work in all circumstances and on all versions of Windows. In particular some applications are believed to force the notification icons to display even if you have hidden them. You should check that the code meets your specific requirements before using it.