Windows 7 任务栏作为侧边栏,最小宽度固定

Windows 7 任务栏作为侧边栏,最小宽度固定

这个问题听起来可能微不足道,也没有必要,但让我越来越烦。如果你在 Windows 7 中为任务栏选择“小图标”,而任务栏位于屏幕顶部或底部,任务栏就会变得非常小。

水平任务栏的屏幕截图

但是因为我有一台宽屏显示器,所以我习惯将任务栏放在屏幕的侧面,因为这样可以更有效地利用空间。但是我无法将任务栏缩小到一定程度,因此它仍然很宽。

垂直任务栏的屏幕截图

是否有一个注册表项可以设置,以使屏幕侧面的宽度与底部或顶部的高度相同?

(PS:MinWidth 技巧在这里没有帮助。)

答案1

一个完美的工作解决方案是:

  • 创建 ThinTaskbar.bat 文件
  • 输入以下内容:

@echo off
echo ThinTaskbar
echo Please wait a few secconds...
net stop "UxSms"
net start "UxSms"

  • 保存并关闭
  • 打开以下任务栏选项:锁定和自动隐藏
  • 以管理员权限执行批处理脚本
  • 完毕!

现在您可以根据需要禁用自动隐藏。每次重启后都必须应用该脚本。

来源:YouTube

答案2

其实我重复问了这个问题,但仍然没有解决Windows Server 2008 上的垂直任务栏太宽

但我可以给你指出这个链接:

http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/when-vertical-cannot-make-taskbar-as-thin-as/9ecf0b1c-e66d-497c-8c2b-5ef3965e2b59

基本上,它表示小图标实际上比实际宽度要宽(但不会更高),这是设计使然。您无法将任务栏的宽度更改为低于图标的虚拟宽度。

之所以允许水平时“高度”较小,是因为每个图标仍然具有较宽的宽度,因此仍然可以轻松地用指尖定位。

也许有人可以使用它来创建解决方案:)

答案3

我有一个现在正在使用的解决方案。我花了几个小时编写代码,并且非常满意,它对我来说非常完美。如果你想使用它,请继续,如果你想在论坛上发布此代码,只需给我 (drange17) 信用即可。反过来,我想词典用于 ConsoleSend 的代码。

首先,我在 C:\Program Files 中创建了一个名为“cmd.lnk”的命令提示符快捷方式。我进入此快捷方式的属性>>快捷方式选项卡>>高级>>启用以管理员身份运行。

其次,我下载了 AutoHotkey 并使其在启动时运行(在“开始”菜单的启动文件夹中放置 AutoHotkey 的快捷方式),使用以下代码(这肯定不是很优雅,我相信有人可以做得更好,但它可以帮我缩小垂直任务栏):

Sleep, 15000
SendInput {LWin Down}r{LWin Up}
IfWinExist, Run
    WinActivate
    Sleep, 500
    SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
    SendInput {Enter}
WinWait, Taskbar and Start Menu Properties
    SendInput {Tab}{Space}{Enter}
WinWaitClose
    Run C:\Program Files\cmd.lnk
WinWait, Administrator: cmd ahk_class ConsoleWindowClass
winwaitactive Administrator: cmd ahk_class ConsoleWindowClass
ConsoleSend("net stop uxsms", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
Sleep, 3000
ConsoleSend("net start uxsms", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
Sleep, 3000
ConsoleSend("exit", "ahk_class ConsoleWindowClass")
ConsoleSend("`r", "ahk_class ConsoleWindowClass")
WinWaitClose
SendInput {LWin Down}r{LWin Up}
IfWinExist, Run
    WinActivate
Sleep, 500
SendInput {Raw}RunDll32.exe shell32.dll,Options_RunDLL 1
SendInput {Enter}
WinWait, Taskbar and Start Menu Properties
SendInput {Tab}{Space}{Enter}
Run outlook.exe
ConsoleSend(text, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")
{
    WinGet, pid, PID, %WinTitle%, %WinText%, %ExcludeTitle%, %ExcludeText%
    if !pid
        return false, ErrorLevel:="window"
    if !DllCall("AttachConsole", "uint", pid)
        return false, ErrorLevel:="AttachConsole"
    hConIn := DllCall("CreateFile", "str", "CONIN$", "uint", 0xC0000000
                , "uint", 0x3, "uint", 0, "uint", 0x3, "uint", 0, "uint", 0)
    if hConIn = -1
        return false, ErrorLevel:="CreateFile"
    VarSetCapacity(ir, 24, 0)       ; ir := new INPUT_RECORD
    NumPut(1, ir, 0, "UShort")      ; ir.EventType := KEY_EVENT
    NumPut(1, ir, 8, "UShort")      ; ir.KeyEvent.wRepeatCount := 1
    Loop, Parse, text ; for each character in text
    {
        NumPut(Asc(A_LoopField), ir, 14, "UShort")
        NumPut(true, ir, 4, "Int")  ; ir.KeyEvent.bKeyDown := true
        gosub ConsoleSendWrite
        NumPut(false, ir, 4, "Int") ; ir.KeyEvent.bKeyDown := false
        gosub ConsoleSendWrite
        Sleep, 10
    }
    gosub ConsoleSendCleanup
    return true
    ConsoleSendWrite:
        if ! DllCall("WriteConsoleInput", "uint", hconin, "uint", &ir, "uint", 1, "uint*", 0)
        {
            gosub ConsoleSendCleanup
            return false, ErrorLevel:="WriteConsoleInput"
        }
    return
    ConsoleSendCleanup:
        if (hConIn!="" && hConIn!=-1)
            DllCall("CloseHandle", "uint", hConIn)
        DllCall("FreeConsole")
    return
}

以下是最终的细垂直任务栏:

在此处输入图片描述

答案4

我是 autohotkey 的忠实粉丝,我花了一些时间才找到解决这个问题的最简单方法。我首先尝试直接更改注册表设置,但这需要重新启动 explorer.exe,我不喜欢这样,所以最终在多次失败的尝试之后,我最终还是选择了这个。如果需要任何改进,我会在 pastebin 中更新代码。

Autohotkey GinThinSideTaskbar 我制作了一个自动热键代码,可以使您的 Windows 7 侧任务栏的小图标 1 图标变细:

^+t::  
        ; GinThinSideTaskbar
        ; by giny8i8
        ; v1p01 at 2014-06-21
        ; If you use the Windows 7 Taskbar on the side of your screen, with smal icons, this makes it look 1 icon thin instead of the default double size.
        ; Assumptions: The taskbar is not hidden when you run this code (UxSms restart thinners the taskbar only if the taskbar is hidden)

        TaskbarToggler() ;Hide Taskbar
        Sleep 1000      ;Wait a little
        RunWait,sc stop "UxSms" ;Stop "Desktop Window Manager Session Manager Service" service.
        RunWait,sc start "UxSms" ;Start "Desktop Window Manager Session Manager Service" service.
        Sleep 1000      ;Wait a little
        TaskbarToggler() ;Show Taskbar again

        TaskbarToggler()
        {
                Run % "RunDll32.exe shell32.dll,Options_RunDLL 1" ;Open "Taskbar and Start Menu Properties" window
                WinWait, Taskbar and Start Menu Properties ;Wait for the window to open
                SendInput {Tab}{Space}{Enter} ;Togle Taskbar hiding
        }
        return

我也把这个放在了http://pastebin.com/4upmWETQ

请随意使用和分发,并请发表反馈!giny8i8

相关内容