如何缩小任务栏中的地址工具栏?

Isz*_*szi 2 windows-7

我喜欢能够直接从我的任务栏运行命令。所以,我在我的新 Windows 7 系统上启用了地址工具栏 - 就像我在旧 XP 系统上一样。然而,酒吧似乎有一个强制性的最小长度,比我希望的要长一点。如果没有记错的话,它大约是 XP 中允许的最小大小的两倍。

有什么办法可以通过注册表项或其他方式调整这个最小长度?

(注意:我还有一个相关的问题,关于删除栏末尾的刷新按钮。)

编辑:为清楚起见,我正在添加屏幕截图。我想缩短的工具栏是下面圈出的工具栏,有一个空的文本输入字段,有一个下拉菜单和“刷新”按钮。我目前将它定位在快速启动工具栏和任务栏之间。在任务栏的远端,系统托盘之前,是一个桌面工具栏。

在此处输入图片说明

Syn*_*ech 5

如果您确保Lock the taskbar is off,您应该能够缩小它,但是当然,Windows Explorer 强加了您发现的最小长度。除了通过黑客找到(大概)硬编码的最小长度的位置之外,除了使用反馈渠道向 Microsoft 投诉之外,您无能为力。explorer.exe

如果您隐藏地址文本标签,那么您可以将其缩小一点(按标签的宽度),但当然,您已经这样做了。

一种可能的解决方案可能是使用第三方窗口操作工具直接编辑窗口,隐藏刷新按钮并调整工具带大小。

您也可以尝试使用宏/热键程序甚至 AutoHotkey/AutoIt/等。设置触发器和事件或只是编写脚本。

更新:

在过去的几天里,我试图编写一个程序(首先是 C++,然后是 AutoHotkey 脚本)来解决这个问题。我学到了一些有趣的东西:

  • 删除刷新按钮非常简单,扩展组合框以使用按钮使用的空间(25 像素)也是如此。
  • 拖动地址栏手柄会重置刷新按钮和组合框大小。换句话说,除非您锁定任务栏,否则资源管理器会将地址栏重置为原来的样子,因为它是硬编码的并且是动态的。
  • 收缩的地址(组合框)可以做到,但即使是这样,螺纹钢本身仍然相同的尺寸和你结束了在任务栏上的空白区域。

换句话说,刷新按钮和最小尺寸是超级硬编码的,并不意味着提供定制。

也许有人会想要去麻烦:

  1. 使用任务栏中的地址栏,并被大小和按钮惹恼
  2. 弄清楚它在哪个文件中被硬编码(Windows 7 中的资源管理器文件比 XP 中的多得多)
  3. 找到它被硬编码的地方(希望只是一个变量,但机会很大)
  4. 检查其他影响,如触发大小的其他事物(Windows 的体系结构往往有很多交互)
  5. 编写一个破解/服务/驱动程序来解决它(破解更容易但更糟糕,因为它必须在大多数更新后重新应用)

除非有人碰巧有足够的兴趣修复它以解决所有麻烦,否则您唯一的选择可能是直接向 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)