How can I shrink the Address toolbar in the Task Bar?
I like being able to run commands straight from my Task Bar. So, I've enabled the Address toolbar on my new Windows 7 system - just like I had on my old XP system. However, the bar seems to have a mandatory minimum length that's a bit longer than I'd prefer. It's about twice as long, if memory serves, as the minimum size allowed in XP.
Is there any way I can adjust this minimum length, through a Registry key or some other means?
(Note: I've also got a related question, about removing the Refresh button at the end of the bar.)
EDIT: For clarity, I'm adding a screenshot. The toolbar I want to shorten is the one circled below, with an empty text-entry field that has a drop-down and "Refresh" button. I currently have it positioned between a Quick Launch toolbar and the Taskbar. On the far side of the Taskbar, before the System Tray, is a Desktop toolbar.
Solution 1:
You should be able to shrink it if you make sure Lock the taskbar is off, but of course, Windows Explorer imposes a minimum length as you have found. Other than hacking explorer.exe
to find the location of the (presumably) hard-coded minimum length, there is not much you can do other than to use the feedback channels to complain to Microsoft.
If you hide the Address text label, then you can shrink it a little more (by the width of the label), but of course, you have already done that.
One possible solution may be to use a third-party window-manipulation tool to edit the window directly, to hide the refresh button and adjust the toolband size.
You could also try using a macro/hotkey program or even AutoHotkey/AutoIt/etc. to set up a trigger and event or just script it.
Update:
I spent the past several days trying to writing a program (first C++, then an AutoHotkey script) to fix this issue. I learned some interesting things:
- Removing the refresh button is quite simple, as is extending the combo-box to use the space (25 pixels) that the button was using.
- Dragging the address-bar handle resets the refresh button and combo-box sizing. In other words, unless you lock the taskbar, Explorer reset the address bar to the way it was because it is hard-coded and dynamic.
- Shrinking the address (the combo-box) can be done, but even then, the rebar itself remains the same size and you end up with a blank space on the taskbar.
In other words, the refresh button and minimum size are super–hard-coded and is not meant to provide customization.
Maybe someone will want to go to the trouble of:
- Using the address bar in the taskbar and be annoyed enough by the size and button
- Figuring out in which file it is hard-coded (there are much more Explorer files in Windows 7 than there were in XP)
- Finding the place where it is hard-coded (hopefully just a single variable, but fat chance with that)
- Checking for other effects like other things that trigger the size (Windows' architecture tends to have lots of interactions)
- Writing a crack/service/driver to work around it (a crack is easier but worse since it would have to be re-applied after most updates)
Unless someone happens to have enough interest in fixing it to go to all the trouble, then perhaps your only options is to complain directly to Microsoft (but don't forget that they are going to want to push Windows 8 soon, so spending time to fix Windows 7, well…)
In the meantime, here is the modified AutoHotkey script that lets you manually specify the width:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SetAddressBarWidth.ahk
;
; This script allows the user to specify the width of the address-bar band of
; the Windows 7 taskbar. It also hides the refresh button and extends the
; combo-box (edit field) to use the space of the refresh button.
;
; http://superuser.com/questions/444407/
;
; (cl) 2012- Synetech inc., Alec Soroudi
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#NoTrayIcon ;No tray icon, duh
#NoEnv ;Not using environment vars
#SingleInstance Force ;Use only a single instance
min:=0 ;Set default width
if 0>0 ;Check for arguments
min=%1% ;Set specified width
abr:="Address Band Root1" ;Window class name
IfWinExist ahk_class Shell_TrayWnd ;Check if taskbar exists
{
ControlGet, tv, Visible, , ToolbarWindow323 ;Is refresh button visible?
ControlGetPos, tx,ty,tw,th, ToolbarWindow323 ;Get button width
ControlGetPos, cx,cy,cw,ch, ComboBoxEx321 ;Get combobox width
ControlGetPos, mx,my,mw,mh, msctls_progress321 ;Get address-bar width
ControlGetPos, ax,ay,aw,ah, %abr% ;Get rebar width
{
Control, Hide,, ToolbarWindow323 ;Hide the refresh button
ControlGetPos, cx,cy,cw,ch, ComboBoxEx321 ;Get current combobox width
if min>0 ;If a width was specified
cw=%min% ;Set the combobox to that width
if tv ;If the refresh button is visible
cw:=cw+tw ;Add its width to the combobox
mw:=cw ;Address-bar is same size
aw:=cw+4 ;Rebar has a 2 pixle border
ControlMove, %abr%, , , %aw% , ;Extend whole address-bar rebar
ControlMove, msctls_progress321, , , %mw% , ;Extend address-bar
ControlMove, ComboBoxEx321, , , %cw% , ;Extend combobox to include button
}
}
Solution 2:
By any means you should consider this like a trusted source of information but only a fact that could help you start solving your problem.
I searched in the registry for address and it came up with the following registry key in HKEY_CURRENT USER\Software\Classes\Local Settings:
@explorerframe.dll,-13137 REG_SZ &Address
Afterwards I looked for the "@explorerframe.dll" and I found another registry called:
MenuTextPUI REG_SZ @C:\Windows\System32\explorerframe.dll,-13137
If you search in your registry for "MenuTextPUI" you'll also find the same kind of keys for Links and Desktop, both part of the Toolbars menu in the taskbar which leads me to think we have the correct values.(might be totally wrong though)
You might want to check those values or even open up explorerframe.dll with Resource Hacker to see what you can find in it.
Maybe a registry guru can help you from here on.
Hope this helps for something.