我喜欢能够直接从我的任务栏运行命令。所以,我在我的新 Windows 7 系统上启用了地址工具栏 - 就像我在旧 XP 系统上一样。然而,酒吧似乎有一个强制性的最小长度,比我希望的要长一点。如果没有记错的话,它大约是 XP 中允许的最小大小的两倍。
有什么办法可以通过注册表项或其他方式调整这个最小长度?
编辑:为清楚起见,我正在添加屏幕截图。我想缩短的工具栏是下面圈出的工具栏,有一个空的文本输入字段,有一个下拉菜单和“刷新”按钮。我目前将它定位在快速启动工具栏和任务栏之间。在任务栏的远端,系统托盘之前,是一个桌面工具栏。

如果您确保Lock the taskbar is off,您应该能够缩小它,但是当然,Windows Explorer 强加了您发现的最小长度。除了通过黑客找到(大概)硬编码的最小长度的位置之外,除了使用反馈渠道向 Microsoft 投诉之外,您无能为力。explorer.exe
如果您隐藏地址文本标签,那么您可以将其缩小一点(按标签的宽度),但当然,您已经这样做了。
一种可能的解决方案可能是使用第三方窗口操作工具直接编辑窗口,隐藏刷新按钮并调整工具带大小。
您也可以尝试使用宏/热键程序甚至 AutoHotkey/AutoIt/等。设置触发器和事件或只是编写脚本。
更新:
在过去的几天里,我试图编写一个程序(首先是 C++,然后是 AutoHotkey 脚本)来解决这个问题。我学到了一些有趣的东西:
换句话说,刷新按钮和最小尺寸是超级硬编码的,并不意味着提供定制。
也许有人会想要去麻烦:
除非有人碰巧有足够的兴趣修复它以解决所有麻烦,否则您唯一的选择可能是直接向 Microsoft 投诉(但不要忘记他们很快就会想要推送 Windows 8,所以花时间修复 Windows 7,好吧……)
同时,这里是修改后的 AutoHotkey 脚本,可让您手动指定宽度:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
}
}
Run Code Online (Sandbox Code Playgroud)