Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Taskbar Always On Top - Disable or Enable

12 Jan 2010   #149

w7-64, w2k
Taskbar Always On Top - Disable or Enable

How to Disable or Enable Taskbar Always on Top in Windows 7


My System SpecsSystem Spec
26 Aug 2011   #150

Windows 7 Pro

Removing KB2515325 had fixed it for me but yesterday, after installing all the latest Windows Updates (except KB2515325) it is broken for me again
Anyone know what is killing it now?

My System SpecsSystem Spec
08 Sep 2011   #151

Windows 7 Home Premium 32bit

Here is an AutoHotKey script that does the job.
1 - Save the script as My_TaskBar.ahk
2 - Find and download AutoHotkey (freeware) from internet
3 - Compile the script with the AHK compiler
Generates My_TaskBar.exe or whatever you like to call it.
4 - AutoHotKey may be removed.
5 - Launch the exe

When My_TaskBar.exe is running, if an application window gets the focus, the taskbar will hide.
This tweak is very handy for people like me who prefer having the TaskBar on the left.
The TaskBar can easily be restored with several "Window-Key" combinations, Win, Win-Tab, Win-b, Win-t.

There is nothing very complicated in the code, just standard window management.
So, it doesn't depend on any Windows 7 KB.

Works on Windows 7 and 2008.

The code is just below.
Hope it will helpfull for some of you.

;# With Windows Seven, the TaskBar is either
;# Hidden or ABOVE the other windows.
;# The XP or Vista option to desactivate
;# "Keep the BaskBar on top of other windows"
;# has been removed.
;# This AHK script recreates the old behaviour.
;# The Windows key or the Win+Tab or Win+t keys
;# make the TaskBar visible.
;# Working with any other window make it disapear.
;# Moving the mouse on the sides of the screen 
;# will NOT make the TaskBar pop up.
;# Requires "Auto-hide taskbar" checkbox in
;# TaskBar properties.
;# 2011-09-01 Creation
; First hide the TaskBar
; Focus and scroll through items on the taskbar.
WinSet, Region, , ahk_class Shell_TrayWnd
WinSet, Region, , ahk_class DV2ControlHost
WinSet, Region, , ahk_class Button
WinSet, Region, , ahk_class TaskListThumbnailWnd
send #t
; Focus the System Tray icons
WinSet, Region, , ahk_class Shell_TrayWnd
WinSet, Region, , ahk_class DV2ControlHost
WinSet, Region, , ahk_class Button
WinSet, Region, , ahk_class TaskListThumbnailWnd
send #b
WinSet, Region, , ahk_class Shell_TrayWnd
WinSet, Region, , ahk_class DV2ControlHost
WinSet, Region, , ahk_class Button
WinSet, Region, , ahk_class TaskListThumbnailWnd
send #
; Wait till TaskBar gains focus
WinWaitActive, ahk_class Shell_TrayWnd
; Restore TaskBar visibility
WinSet, Region, , ahk_class Shell_TrayWnd
;WinActivate, ahk_class Shell_TrayWnd
;# One time (-99) new thread
SetTimer, HIDE_TRAY,-99
; Give time for things to complete
sleep, 100
; Just for debugging - May be removed
while (0>1)
WinGetClass, Win_Class, A
SplashTextOn, 400, 300, Clipboard, %Win_Class%
sleep, 500
; Wait till TaskBar looses focus
WinWaitNotActive, ahk_class Shell_TrayWnd
WinGetClass, Win_Class, A
; Try again if the Start Menu (DV2ControlHost) poped up
if Win_Class = DV2ControlHost
WinWaitNotActive, ahk_class DV2ControlHost
;MsgBox Start Menu 2
SetTimer, HIDE_TRAY,-99
if Win_Class = Button
WinWaitNotActive, ahk_class Button
;MsgBox Start Menu 2
SetTimer, HIDE_TRAY,-99
if Win_Class = TaskListThumbnailWnd
WinWaitNotActive, ahk_class TaskListThumbnailWnd
;MsgBox Start Menu 2
SetTimer, HIDE_TRAY,-99
;MsgBox Hide
WinSet, Region, 0-0 W0 H0, ahk_class TaskListThumbnailWnd
WinSet, Region, 0-0 W0 H0, ahk_class DV2ControlHost
WinSet, Region, 0-0 W0 H0, ahk_class Button
WinSet, Region, 0-0 W0 H0, ahk_class Shell_TrayWnd
SetTimer, SHOW_TRAY,-99
My System SpecsSystem Spec
12 Sep 2011   #152

Windblows 7

@seventab worked like a charm for me. Thank you for posting that.
My System SpecsSystem Spec
13 Sep 2011   #153
Glenn a windows

Windows 7

Hey seventab, thanks for the code. It works much better than mine at Taskbar Always On Top - Disable or Enable -- mine had strange effects on the tooltips for system tray icons... they would show up partially behind the taskbar depending on geometry.

However, there is one situation I've never figured out in my code, and your code also suffers from it. I have a workaround, but it is an annoyance when it happens.

To trigger the situation: run Firefox. Download a file. Download window pops up on top. Ignore it, click on other things in the browser. Download another file. Download window, now no longer on top, expresses its desire to want to be on top, and the task bar appears, with the download window widget highlighted... and there it sticks, task bar on top, and won't go away.

Workaround: click on the highlighted widget (or the download window if it is visible) to bring it to the top. Then click on a different window, and the taskbar will go away.

There may be other similar situations with other software, but this is one that happens to me relatively frequently, but not frequently enough that I've learned enough about Windows to try to cure it... seems like you already know way more than me about Windows, so maybe once you produce the situation it will be obvious what the problem is (or at least what an automatic cure might be).

Sad, when we have to spend time making Windows work the way it used to, which is better than how it now does...
My System SpecsSystem Spec

23 Sep 2011   #154

Windows 7 Home Premium 32bit

Well, Glenn, I couldn't reproduce your problem.
So it will be difficult to help you, sorry.

Some explanations about the AHK code:
First, it tries to detect that the TaskBar has lost focus, BUT excludes the satellite objects like the Start Orb Button, the Start menu, ASO.
But I may have missed some things or particular conditions.
Any comment appreciated.

Second, if the TaskBar does have lost focus it hides the TaskBar.
In fact it doesn't hide the TaskBar window, but reduces its visible frame (so called Region) to a zero by zero square (which is not much !).

The only way I know to make the TaskBar reapear again is the AHK code that resets the TaskBar's Region to its original value (WinSet, Region, , ahk_class Shell_TrayWnd, aso ...).
This code is only triggered by Windows-Key, Windows-Key+b or Windows-Key+Tab.
There may be conditions that make the TaskBar reapear without any help from the AHK code, but I didn't saw it up to now.

The code is not perfect...
For example, if the AHK exe is killed while the TaskBar is hidden, it will never reapear ... unless you start the exe again.
... But it is simple and quite clean in its logic.
And it doesn't rely on any Windows patch level.

Hi ...
My System SpecsSystem Spec
25 Sep 2011   #155
Glenn a windows

Windows 7

Well, thanks for trying. And thanks for explaining a bit of how it works. I have observed some symptoms since I last wrote, and it seems that possibly you have explained some of it, and I wonder if there is something that could be done to make it better.

First, I will mention that my computer (Windows 7 64-bit) crashes between 0 and a dozen times a day. It seems possible that the last couple rounds of updates from M$ may have improved things a bit, but I'm won't be sure for a couple more weeks. Meanwhile, one of the symptoms that I experience after a crash is that my locked taskbar sometimes vanishes completely, or moves.

The next thing about my computer is that it has two monitors. It seems that the Taskbar and Start Menu Properties dialog allows selection of Taskbar Location as Left Right Top or Bottom, but there is no provision for selection of which monitor! Dragging the Taskbar works, though, to take it to any of the 8 possible locations on the two monitors. After a crash, when it vanishes completely (something I haven't seen for a while) or moves (which has happened pretty regularly, even after a clean shutdown, now) it seems to move from the left edge of the primary monitor (position 0, 0) to the left edge of the secondary monitor (position -1600, 400).

For my next clean shutdown, I'll close your AHK program first, and see if that avoids the above problem.

You mention:
This code is only triggered by Windows-Key, Windows-Key+b or Windows-Key+Tab.
I experienced some strange behavior with the # key after loading your program, and eventually tracked it down to the third hotkey definition, which is uncommented, and starts "#::" By process of elimination, the first hotkey seems to be "#Tab::", and the second hotkey definition seems to be "#b", so the implementation seems to be in the reverse order of the quote above. Which means that "#::" must be an attempt to trigger the Windows-Key: while AHK treats # as the Windows-Key modifier, when it stands alone, maybe it stands for the hash-mark (a.k.a. pound sign or sharp sign) key. I had changed that to "#a::" not knowing your intention which cured my problem using #, but changing it instead to "LWin::" seems to be more in line with your intention? Maybe to support people with two Windows keys, "RWin:::" should also be similarly defined? Or is "RWin::" the context menu key, in which case it maybe shouldn't be?

Now on a multiple monitor system, with my task bar on the left edge of the right monitor, I'm noticing a new effect, which I hadn't with my code, and now that you've explained a bit, it may be an artifact of how your code works, but I don't have sufficient Windows knowledge to really understand it... with the task bar auto-hid, your code running (with the LWin:, when I hit the Windows key, the lower 1200 pixels of my task bar suddenly appear on the right edge of the left monitor!

Finally, it seems there are times when the task bar is not at all able to be found by the mouse. It seems to me that when Windows does AutoHide, it reduces the Region to one pixel along the whole edge of the monitor, rather than your described single pixel or less in the corner. Have you tried reducing the Region in a similar manner?

I have discovered, using Google and RegEdit, that in registry key


the last 8 bytes of the Settings value are the width and height of the task bar window. I haven't been able to find anyone that has documented the whole Settings value, nor have I yet had opportunity to look at StuckRects2 when my talkbar suddenly windows up at the left of monitor 2 instead of monitor 1.

But to try out the single row of pixels idea, perhaps this Settings values could be useful, or perhaps you know other ways of determining the size. I haven't figured out how your code restores the original values, or saves them! I'm not an expert in AHK or Windows, just stumble along, with Google's help, when I need something.
My System SpecsSystem Spec
27 Sep 2011   #156

Windows 7 Starter x32
Taskbar Always on Top Fix - works - MS motive

Deleting / Hiding the KB2515325 Update and the fix application works great - thanks... I have to believe MS has a motive behind the removal of the "Always on Top" toggle option that relates to selling us something or shilling something through an always-visible Taskbar...
My System SpecsSystem Spec
03 Oct 2011   #157

Windows 7 Home Premium 32bit

Well, Glenn, IMO, having the taskbar on the left is by far the best configuration.

Having it at the bottom is not convenient because each task is just represented by a small rectangle whose surface diminishes each time a new task is started. The titles rapidly become unreadable and useless, and it is then uneasy to select the task you want to jump to.
I see no real point in having it at the top.
This leaves Left or Right. My choice goes to Left as it keeps the close button of the last active window accessible.
So I have been using a wide taskbar (one row for each task with the full titles displayed) on the Left since XP.
With XP, when the tasks where too numerous the space were divided into columns. Great.
But a wide TaskBar takes almost one half of the screen. So, it has to be hidden.
This was provided in XP by the old option to disable "keep-taskbar-above-the-other-windows".
It started to be more dificult with Vista and a disaster with Seven as Microsoft, in its great wisdom decided to remove that old option, rendering impossible to have a wide TB on Left.
I insist on the old XP option to disable keep-taskbar-above-the-other-windows: It means the taskbar COMPLETELY disapears of the screen. Not a single pixel left. No area you can move your mouse above to make it popup. Nada.
The display is fully available to the application windows.
But some keys make it reapear (Windows-Key, Windows-Tab...).

So, I have been looking for a bypass or a solution for quite a time, and I ended up developping this small tool myself as I found no really satisfactory solution otherwise.

To come back to your comments about the #xxx AHK code
#:: is triggered when pressing the Windows-Key alone.
The default Windows behaviour is to display the start menu.
The AHK code just includes to show what has been hidden and then sends the Windows-Key... alone.

#Tab:: is triggered when pressing at the same time the Windows-Key and the Tab-Key.
The default Windows XP behaviour is to scroll among all the tasks (quite similar to Alt-Tab).
The Seven equivalent is Windows-Key and t-key, but my fingers are a few cm too short to find this practical.
The AHK code just includes to show what has been hidden and then sends the Windows-Key and t-key.

#b:: same principle for the tray notification area.
See .
I never use it, but some may and this is free !

AFAIK there is no possible confusion between all theses parts of the code.
AHK recognises the Window-Key alone because it means the key has been pressed AND released to trigger "#::".
Idem for #Tab. It means Windows-Key pressed then Tab_key pressed-and-released.
So there is particular preseance order to write these parts of the code.

I dont have two monitors so I still cannot see what happens for you.
But once again, the code is not supposed to mess up the position of the Taskbar. It just reduces its visible space to zero or restores it to its original status.
But Windows moves in mysterious ways.

You say your Taskbar sometimes completely disapears. As explained above, this is exactly what the AHK code is supposed to do: Completely hide the taskbar if another window has got the focus.
Use Window-Key combinations above to make it reapear.

You also say you computer crashes, but give no detail.
Obviousy your computer is still working, not crashed. It just suffered some kind of problem you don't describe.
If this occurred just after you started using the AHK program, I would suggest you stop using it as I won't be able to help you a lot.
If there is no connection, you should pinpoint and fix the actual cause of your problem.

Hope this helps anyway.
My System SpecsSystem Spec
08 Oct 2011   #158
Glenn a windows

Windows 7

Thanks again for your responses, seventab.

Yes, I don't think the crashes are caused by your code, I was just wondering how your code remembers the real size of the task bar window, or how it shrinks the window to nothing without destroying the original size of the task bar window. And then if somehow the crash was sometimes catching Windows in a state that it couldn't correctly recover from. However, I created a version that mixes my original concept with yours, instead of changing the size of the window, I change

WinSet, AlwaysOnTop, on, ahk_class TaskListThumbnailWnd
WinSet, AlwaysOnTop, on, ahk_class Shell_TrayWnd

WinSet, AlwaysOnTop, Off, ahk_class Shell_TrayWnd
WinSet, AlwaysOnTop, Off, ahk_class TaskListThumbnailWnd
WinSet, Bottom, , ahk_class Shell_TrayWnd

and this is working reasonably well.

I think they are bugs in Windows 7: they have happened since I began using Windows 7. With the last couple batches of Windows 7 updates, the crashes seem to have diminished in frequency, so maybe they are finally starting to address them. I wish I could pinpoint the actual cause of the crashes; however, since Windows 7 uses protected mode, crashes that reboot Windows 7 are clearly Windows 7 or driver problems, not application problems, so it is up to M$ to fix. The last 15 crashes were all the same apparent root cause according to "WhoCrashed": On Sat 10/8/2011 8:43:10 PM GMT your computer crashed
crash dump file: C:\Windows\Minidump\100811-20950-01.dmp
This was probably caused by the following module: ntoskrnl.exe (nt+0x7CC40)
Bugcheck code: 0x124 (0x0, 0xFFFFFA800DF00028, 0xB6002000, 0x87000135)
file path: C:\Windows\system32\ntoskrnl.exe
product: Microsoft® Windows® Operating System
company: Microsoft Corporation
description: NT Kernel & System
Bug check description: This bug check indicates that a fatal hardware error has occurred. This bug check uses the error data that is provided by the Windows Hardware Error Architecture (WHEA).
This is likely to be caused by a hardware problem problem. This problem might be caused by a thermal issue.
The crash took place in the Windows kernel. Possibly this problem is caused by another driver which cannot be identified at this time.

Regarding the possibility of hardware problems, I have run both disk and memory diagnostics. That is not exhaustive, but is a start, I research other tests when I get a chance, so far none has pinpointed a hardware problem. Regarding thermal issues, the problem sometimes happens within minutes of starting the computer after it cooled all night, and sometimes at rest midday when I may or may not be actively using it (but windows are open), and sometimes when the fan is running at a faster speed than its usual steady state, and I have some CPU intensive program running. But it is certainly not consistent. Also, it sometimes seems to be triggered by having too many Firefox tabs open to my local newspaper web site (, as _many_ of the crashes happen when I browse that site and open a number of tabs, but it also crashes when not viewing that site, or actively interacting with Firefox. Many tabs at that site do often cause the fan to speed up, so I cannot totally rule out a thermal issue, but a fair number of the crashes do happen when the CPU fan is at its lower speed, and when the system is hardly doing anything at all.

You say: To come back to your comments about the #xxx AHK code #:: is triggered when pressing the Windows-Key alone.

I'm using AHK version

I'm not sure what version of AHK you are using, but the documentation for the current version at the AHK site claims that # means Windows-Key when it is used as a modifier, but not when used alone. Hotkeys (Mouse, Joystick and Keyboard Shortcuts) Note there is no use of the # without another key following, in any of the examples. And on my system, your #:: hotkey:

(1) does not produce any change in behavior with respect to the taskbar and Start Menu appearing whether I include it in your script or not.

(2) When I do include it, it interferes with a different AHK macro I have running that defines a definition for the "#" (shift 3) key.

You might find it enlightening to play with the following hotkeys, without other AHK macros running. Note that if they are all running at the same time, the first will be occluded by the second.

; shift plus 3 -- only works with a new press of the shift key; holding shift then 2 instances of 3 produces aoeui3
Send aoeui

; pound sign key -- requires the shift key and the 3 key; occludes the above;
; 2 presses of the 3 while shift is held produces dhtnsdhtns
send dhtns

; Windows key plus 3
send 12345

; Windows key plus shift key plus 3
send 67890
My System SpecsSystem Spec
03 Nov 2011   #159
Matt Dralle

Windows 7 Ultimate 64
DisableTaskbarOnTop64.exe Startup Error - Explorer Version Unknown...

I'm getting the following error when I start the TaskBarOnTop64.exe on my Windows 7 Ultimate 64 system:

Unknown Explorer version (, can't apply patch.

Can you update the utility to include this version of Explorer?


My System SpecsSystem Spec

 Taskbar Always On Top - Disable or Enable

Tutorial Tools

Similar help and support threads for2: Taskbar Always On Top - Disable or Enable
Windows 7 Tutorial Category
Taskbar Pinned Programs - Enable or Disable Tutorials
Taskbar - Resize - Enable or Disable Tutorials
Taskbar - Enable or Disable Moving Tutorials
How to enable/disable/configure MAC style taskbar? Network & Sharing
Preview taskbar enable/disable Customization
Taskbar Context Menus - Enable or Disable Tutorials

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 01:13 PM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33